wfcqueue: document first/next return values
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 6 Dec 2012 21:02:30 +0000 (16:02 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 6 Dec 2012 21:03:05 +0000 (16:03 -0500)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
urcu/static/wfcqueue.h
urcu/wfcqueue.h

index 99643be98c393310bc36d591262fcddd5f0227af..4b3535aaa83207a4f4eb801dc63150bef8f28bbc 100644 (file)
@@ -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,
index d9ec5349d7be203da7f80f6e6c0de5cda96e20e9..b6be9f3dfaad4ca5bea9db29ad72dd043d1ffada 100644 (file)
@@ -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,
This page took 0.028055 seconds and 4 git commands to generate.