X-Git-Url: https://git.liburcu.org/?p=urcu.git;a=blobdiff_plain;f=urcu%2Fstatic%2Fwfcqueue.h;fp=urcu%2Fstatic%2Fwfcqueue.h;h=944ee88c74d855f78035b6f826c8b73eb6de79b6;hp=a989984b4030b52f79cc737604aed997f2163d4a;hb=f94061a3df4c9eab9ac869a19e4228de54771fcb;hpb=b9f893b69fbc31baea418794938f4eb74cc4923a diff --git a/urcu/static/wfcqueue.h b/urcu/static/wfcqueue.h index a989984..944ee88 100644 --- a/urcu/static/wfcqueue.h +++ b/urcu/static/wfcqueue.h @@ -48,8 +48,9 @@ extern "C" { * * Unless otherwise stated, the caller must ensure mutual exclusion of * queue update operations "dequeue" and "splice" (for source queue). - * Queue read operations "first" and "next" need to be protected against - * concurrent "dequeue" and "splice" (for source queue) by the caller. + * Queue read operations "first" and "next", which are used by + * "for_each" iterations, need to be protected against concurrent + * "dequeue" and "splice" (for source queue) by the caller. * "enqueue", "splice" (for destination queue), and "empty" are the only * operations that can be used without any mutual exclusion. * Mutual exclusion can be ensured by holding cds_wfcq_dequeue_lock(). @@ -190,6 +191,10 @@ ___cds_wfcq_node_sync_next(struct cds_wfcq_node *node) * Content written into the node before enqueue is guaranteed to be * consistent, but no other memory ordering is ensured. * Should be called with cds_wfcq_dequeue_lock() held. + * + * Used by for-like iteration macros in urcu/wfqueue.h: + * __cds_wfcq_for_each_blocking() + * __cds_wfcq_for_each_blocking_safe() */ static inline struct cds_wfcq_node * ___cds_wfcq_first_blocking(struct cds_wfcq_head *head, @@ -211,6 +216,10 @@ ___cds_wfcq_first_blocking(struct cds_wfcq_head *head, * Content written into the node before enqueue is guaranteed to be * consistent, but no other memory ordering is ensured. * Should be called with cds_wfcq_dequeue_lock() held. + * + * Used by for-like iteration macros in urcu/wfqueue.h: + * __cds_wfcq_for_each_blocking() + * __cds_wfcq_for_each_blocking_safe() */ static inline struct cds_wfcq_node * ___cds_wfcq_next_blocking(struct cds_wfcq_head *head,