+#ifndef _URCU_RCUWFQUEUE_H
+#define _URCU_RCUWFQUEUE_H
+
/*
* rcuwfqueue.h
*
#include <urcu/urcu_ref.h>
#include <assert.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#if (!defined(_GNU_SOURCE) && !defined(_LGPL_SOURCE))
#error "Dynamic loader LGPL wrappers not implemented yet"
#endif
* modified/re-used/freed until the reference count reaches zero and a grace
* period has elapsed (after the refcount reached 0).
*
- * TODO: implement adaptative busy-wait and wait/wakeup scheme rather than busy
- * loops. Better for UP.
+ * No need to go on a waitqueue here, as there is no possible state in which the
+ * list could cause dequeue to busy-loop needlessly while waiting for another
+ * thread to be scheduled. The queue appears empty until tail->next is set by
+ * enqueue.
*/
struct rcu_wfq_node *
rcu_wfq_dequeue_blocking(struct rcu_wfq_queue *q,
}
}
}
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _URCU_RCUWFQUEUE_H */