* enqueue.
*/
struct wfq_node *
-__wfq_dequeue_blocking(struct wfq_queue *q)
+___wfq_dequeue_blocking(struct wfq_queue *q)
{
struct wfq_node *node, *next;
int attempt = 0;
if (node == &q->dummy) {
_wfq_node_init(node);
_wfq_enqueue(q, node);
- return __wfq_dequeue_blocking(q);
+ return ___wfq_dequeue_blocking(q);
}
return node;
}
ret = pthread_mutex_lock(&q->lock);
assert(!ret);
- retnode = __wfq_dequeue_blocking(q);
+ retnode = ___wfq_dequeue_blocking(q);
ret = pthread_mutex_unlock(&q->lock);
assert(!ret);
return retnode;
#define wfq_node_init _wfq_node_init
#define wfq_init _wfq_init
#define wfq_enqueue _wfq_enqueue
+#define __wfq_dequeue_blocking ___wfq_dequeue_blocking
#define wfq_dequeue_blocking _wfq_dequeue_blocking
#else /* !_LGPL_SOURCE */
extern void wfq_node_init(struct wfq_node *node);
extern void wfq_init(struct wfq_queue *q);
extern void wfq_enqueue(struct wfq_queue *q, struct wfq_node *node);
+/* __wfq_dequeue_blocking: caller ensures mutual exclusion between dequeues */
+extern struct wfq_node *__wfq_dequeue_blocking(struct wfq_queue *q);
extern struct wfq_node *wfq_dequeue_blocking(struct wfq_queue *q);
#endif /* !_LGPL_SOURCE */
_wfq_enqueue(q, node);
}
+struct wfq_node *__wfq_dequeue_blocking(struct wfq_queue *q)
+{
+ return ___wfq_dequeue_blocking(q);
+}
+
struct wfq_node *wfq_dequeue_blocking(struct wfq_queue *q)
{
return _wfq_dequeue_blocking(q);