X-Git-Url: https://git.liburcu.org/?p=urcu.git;a=blobdiff_plain;f=urcu%2Fstatic%2Fwfqueue.h;h=df9f62f28bafa189a5b2f0d61fcbfce8b978b7b4;hp=636e1afa8e949e19bae448b1d5775eefd202f717;hb=200d100e05ed8e10c47f971939042f2406df92ef;hpb=b9103f30e18bf81ffbebb6a23215f19f621cd76b diff --git a/urcu/static/wfqueue.h b/urcu/static/wfqueue.h index 636e1af..df9f62f 100644 --- a/urcu/static/wfqueue.h +++ b/urcu/static/wfqueue.h @@ -65,6 +65,12 @@ static inline void _cds_wfq_init(struct cds_wfq_queue *q) assert(!ret); } +static inline void _cds_wfq_destroy(struct cds_wfq_queue *q) +{ + int ret = pthread_mutex_destroy(&q->lock); + assert(!ret); +} + static inline void _cds_wfq_enqueue(struct cds_wfq_queue *q, struct cds_wfq_node *node) { @@ -98,7 +104,7 @@ ___cds_wfq_node_sync_next(struct cds_wfq_node *node) */ while ((next = CMM_LOAD_SHARED(node->next)) == NULL) { if (++attempt >= WFQ_ADAPT_ATTEMPTS) { - poll(NULL, 0, WFQ_WAIT); /* Wait for 10ms */ + (void) poll(NULL, 0, WFQ_WAIT); /* Wait for 10ms */ attempt = 0; } else caa_cpu_relax();