/* Make sure the initial node is never freed. */
urcu_ref_set(&q->init.ref, URCU_LFQ_PERMANENT_REF);
q->head = q->tail = &q->init;
}
/* Make sure the initial node is never freed. */
urcu_ref_set(&q->init.ref, URCU_LFQ_PERMANENT_REF);
q->head = q->tail = &q->init;
}
* Now move tail (another enqueue might beat
* us to it, that's fine).
*/
* Now move tail (another enqueue might beat
* us to it, that's fine).
*/
* The entry returned by dequeue must be taken care of by doing a urcu_ref_put,
* which calls the release primitive when the reference count drops to zero. A
* grace period must be waited after execution of the release callback before
* The entry returned by dequeue must be taken care of by doing a urcu_ref_put,
* which calls the release primitive when the reference count drops to zero. A
* grace period must be waited after execution of the release callback before
* structure.
* In other words, the entry lfq node returned by dequeue must not be
* modified/re-used/freed until the reference count reaches zero and a grace
* period has elapsed (after the refcount reached 0).
*/
* structure.
* In other words, the entry lfq node returned by dequeue must not be
* modified/re-used/freed until the reference count reaches zero and a grace
* period has elapsed (after the refcount reached 0).
*/