X-Git-Url: http://git.liburcu.org/?p=urcu.git;a=blobdiff_plain;f=wfcqueue.c;h=ab0eb939e912e15c4b8f44ca9d65d67df0a3b4cd;hp=3474ee0819a10943ef52b32853210418a5ec3d38;hb=ed1b099ef8acd1396dbde7c7150d1a5eb16ce8a6;hpb=47215721095cf47e110f113d26f9e61514405a4c diff --git a/wfcqueue.c b/wfcqueue.c index 3474ee0..ab0eb93 100644 --- a/wfcqueue.c +++ b/wfcqueue.c @@ -1,7 +1,7 @@ /* * wfcqueue.c * - * Userspace RCU library - Concurrent queue with Wait-Free Enqueue/Blocking Dequeue + * Userspace RCU library - Concurrent Queue with Wait-Free Enqueue/Blocking Dequeue * * Copyright 2010-2012 - Mathieu Desnoyers * Copyright 2011-2012 - Lai Jiangshan @@ -47,23 +47,23 @@ bool cds_wfcq_empty(struct cds_wfcq_head *head, return _cds_wfcq_empty(head, tail); } -void cds_wfcq_enqueue(struct cds_wfcq_head *head, +bool cds_wfcq_enqueue(struct cds_wfcq_head *head, struct cds_wfcq_tail *tail, struct cds_wfcq_node *node) { - _cds_wfcq_enqueue(head, tail, node); + return _cds_wfcq_enqueue(head, tail, node); } void cds_wfcq_dequeue_lock(struct cds_wfcq_head *head, struct cds_wfcq_tail *tail) { - cds_wfcq_dequeue_lock(head, tail); + _cds_wfcq_dequeue_lock(head, tail); } void cds_wfcq_dequeue_unlock(struct cds_wfcq_head *head, struct cds_wfcq_tail *tail) { - cds_wfcq_dequeue_unlock(head, tail); + _cds_wfcq_dequeue_unlock(head, tail); } struct cds_wfcq_node *cds_wfcq_dequeue_blocking( @@ -73,13 +73,13 @@ struct cds_wfcq_node *cds_wfcq_dequeue_blocking( return _cds_wfcq_dequeue_blocking(head, tail); } -void cds_wfcq_splice_blocking( +enum cds_wfcq_ret cds_wfcq_splice_blocking( struct cds_wfcq_head *dest_q_head, struct cds_wfcq_tail *dest_q_tail, struct cds_wfcq_head *src_q_head, struct cds_wfcq_tail *src_q_tail) { - _cds_wfcq_splice_blocking(dest_q_head, dest_q_tail, + return _cds_wfcq_splice_blocking(dest_q_head, dest_q_tail, src_q_head, src_q_tail); } @@ -97,17 +97,17 @@ struct cds_wfcq_node *__cds_wfcq_dequeue_nonblocking( return ___cds_wfcq_dequeue_nonblocking(head, tail); } -void __cds_wfcq_splice_blocking( +enum cds_wfcq_ret __cds_wfcq_splice_blocking( struct cds_wfcq_head *dest_q_head, struct cds_wfcq_tail *dest_q_tail, struct cds_wfcq_head *src_q_head, struct cds_wfcq_tail *src_q_tail) { - ___cds_wfcq_splice_blocking(dest_q_head, dest_q_tail, + return ___cds_wfcq_splice_blocking(dest_q_head, dest_q_tail, src_q_head, src_q_tail); } -int __cds_wfcq_splice_nonblocking( +enum cds_wfcq_ret __cds_wfcq_splice_nonblocking( struct cds_wfcq_head *dest_q_head, struct cds_wfcq_tail *dest_q_tail, struct cds_wfcq_head *src_q_head,