+ __cds_wfcq_init(&tmp_head, &tmp_tail);
+
+ /* Ensure that we preserve FIFO work order. */
+ assert(!steal || worker->own == NULL);
+
+ /* Splice to temporary queue. */
+ if (steal)
+ cds_wfcq_dequeue_lock(src_head.h, src_tail);
+ splice_ret = __cds_wfcq_splice_blocking(&tmp_head,
+ &tmp_tail,
+ src_head,
+ src_tail);
+ if (steal)
+ cds_wfcq_dequeue_unlock(src_head.h, src_tail);
+ if (splice_ret == CDS_WFCQ_RET_SRC_EMPTY)
+ return false;
+
+ /*
+ * Keep one work entry for ourself. This ensures forward
+ * progress amongst stealing co-workers. This also ensures that
+ * when a worker grab some work from the global workqueue, it
+ * will have at least one work item to deal with.
+ */
+ if (worker->own == NULL) {
+ if (!steal) {
+ /*
+ * Try to grab own work from worker workqueue to
+ * preserve FIFO order.
+ */
+ node = cds_wfcq_dequeue_blocking(&worker->head,
+ &worker->tail);
+ if (node)
+ goto got_node;
+ }
+ node = __cds_wfcq_dequeue_blocking(&tmp_head, &tmp_tail);
+ assert(node != NULL);
+got_node:
+ worker->own = caa_container_of(node, struct urcu_work, node);
+ }
+
+ /* Splice into worker workqueue. */
+ splice_ret = __cds_wfcq_splice_blocking(&worker->head,