workqueue: use cds_wfcq_splice_blocking() rather than explicit locks
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 23 Oct 2014 13:01:29 +0000 (09:01 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 23 Oct 2014 13:01:29 +0000 (09:01 -0400)
cds_wfcq_splice_blocking() internally takes the locks.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
urcu/workqueue-fifo.h

index 68e050afdce43314b67cea2ad570fc3e836d8a37..0c85ca77c6cf6cc5c146e6bc5d7db355c5ea4548 100644 (file)
@@ -192,12 +192,10 @@ bool ___urcu_steal_work(struct urcu_worker *worker,
         */
        if (cds_wfcq_empty(&sibling->head, &sibling->tail))
                return false;
-       cds_wfcq_dequeue_lock(&sibling->head, &sibling->tail);
-       splice_ret = __cds_wfcq_splice_blocking(&worker->head,
+       splice_ret = cds_wfcq_splice_blocking(&worker->head,
                        &worker->tail,
                        &sibling->head,
                        &sibling->tail);
-       cds_wfcq_dequeue_unlock(&sibling->head, &sibling->tail);
        /* Ensure that we preserve FIFO work order. */
        assert(splice_ret != CDS_WFCQ_RET_DEST_NON_EMPTY);
        return splice_ret != CDS_WFCQ_RET_SRC_EMPTY;
This page took 0.036259 seconds and 4 git commands to generate.