From: Mathieu Desnoyers Date: Thu, 23 Oct 2014 21:44:05 +0000 (-0400) Subject: workqueue: consider "own" item for do_work criterion X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=0a14cd14bb8de4385c133f5cec3c4ec06f41ee8b;p=userspace-rcu.git workqueue: consider "own" item for do_work criterion Signed-off-by: Mathieu Desnoyers --- diff --git a/urcu/workqueue-fifo.h b/urcu/workqueue-fifo.h index a3d1e72..a2bbd90 100644 --- a/urcu/workqueue-fifo.h +++ b/urcu/workqueue-fifo.h @@ -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))