X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=urcu%2Fstatic%2Fwfqueue.h;h=19314f5f9223498ba45b749c4af678ed607cf2fb;hb=779aaaa65f384a11f332302700dcff4216912cae;hp=790931bef25db04d2156fe0cd39dd260b31a0474;hpb=af7c2dbeac32c663b64ad05e4eca70e18784463b;p=urcu.git diff --git a/urcu/static/wfqueue.h b/urcu/static/wfqueue.h index 790931b..19314f5 100644 --- a/urcu/static/wfqueue.h +++ b/urcu/static/wfqueue.h @@ -30,7 +30,7 @@ #include #include #include -#include +#include #ifdef __cplusplus extern "C" { @@ -75,7 +75,7 @@ static inline void _cds_wfq_enqueue(struct cds_wfq_queue *q, * structure containing node and setting node->next to NULL before * publication. */ - old_tail = uatomic_xchg(&q->tail, node); + old_tail = uatomic_xchg(&q->tail, &node->next); /* * At this point, dequeuers see a NULL old_tail->next, which indicates * that the queue is being appended to. The following store will append