workqueue: consider "own" item for do_work criterion
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 23 Oct 2014 21:44:05 +0000 (17:44 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 23 Oct 2014 21:44:05 +0000 (17:44 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
urcu/workqueue-fifo.h

index a3d1e72b2782a0afeeb6a438d64825b6a1d1c6cb..a2bbd909fdb1ae3923c8743d155752dceb016802 100644 (file)
@@ -366,7 +366,8 @@ enum urcu_accept_ret urcu_accept_work(struct urcu_workqueue *queue,
 
        has_work = ___urcu_grab_work(worker, &queue->head, &queue->tail, 0);
        /* Don't wait if we have work to do. */
-       if (has_work || !cds_wfcq_empty(&worker->head, &worker->tail))
+       if (has_work || worker->own
+                       || !cds_wfcq_empty(&worker->head, &worker->tail))
                goto do_work;
        /* Try to steal work from sibling instead of blocking */
        if (__urcu_steal_work(queue, worker))
This page took 0.027005 seconds and 4 git commands to generate.