From 131a29a6627c8a1aee35491ac43984ebe756909c Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Thu, 6 Dec 2012 16:02:30 -0500 Subject: [PATCH] wfcqueue: document first/next return values Signed-off-by: Mathieu Desnoyers --- urcu/static/wfcqueue.h | 5 +++++ urcu/wfcqueue.h | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/urcu/static/wfcqueue.h b/urcu/static/wfcqueue.h index 99643be..4b3535a 100644 --- a/urcu/static/wfcqueue.h +++ b/urcu/static/wfcqueue.h @@ -262,6 +262,8 @@ ___cds_wfcq_first(struct cds_wfcq_head *head, * Used by for-like iteration macros in urcu/wfqueue.h: * __cds_wfcq_for_each_blocking() * __cds_wfcq_for_each_blocking_safe() + * + * Returns NULL if queue is empty, first node otherwise. */ static inline struct cds_wfcq_node * ___cds_wfcq_first_blocking(struct cds_wfcq_head *head, @@ -321,6 +323,9 @@ ___cds_wfcq_next(struct cds_wfcq_head *head, * Used by for-like iteration macros in urcu/wfqueue.h: * __cds_wfcq_for_each_blocking() * __cds_wfcq_for_each_blocking_safe() + * + * Returns NULL if reached end of queue, non-NULL next queue node + * otherwise. */ static inline struct cds_wfcq_node * ___cds_wfcq_next_blocking(struct cds_wfcq_head *head, diff --git a/urcu/wfcqueue.h b/urcu/wfcqueue.h index d9ec534..b6be9f3 100644 --- a/urcu/wfcqueue.h +++ b/urcu/wfcqueue.h @@ -280,6 +280,8 @@ extern enum cds_wfcq_ret __cds_wfcq_splice_nonblocking( * Used by for-like iteration macros: * __cds_wfcq_for_each_blocking() * __cds_wfcq_for_each_blocking_safe() + * + * Returns NULL if queue is empty, first node otherwise. */ extern struct cds_wfcq_node *__cds_wfcq_first_blocking( struct cds_wfcq_head *head, @@ -306,6 +308,9 @@ extern struct cds_wfcq_node *__cds_wfcq_first_nonblocking( * Used by for-like iteration macros: * __cds_wfcq_for_each_blocking() * __cds_wfcq_for_each_blocking_safe() + * + * Returns NULL if reached end of queue, non-NULL next queue node + * otherwise. */ extern struct cds_wfcq_node *__cds_wfcq_next_blocking( struct cds_wfcq_head *head, -- 2.34.1