X-Git-Url: https://git.lttng.org/?p=urcu.git;a=blobdiff_plain;f=src%2Fworkqueue.c;h=14957a0d3910aa83740d4e22b5420aa48658cf84;hp=0b1a9eae41f91ba5bad8dc7e43db2731707d8854;hb=89d19b437b1467f98ecee4190d1160e99111671f;hpb=73d8b52e55af02475eb693a33b36fcfbcf761c9a diff --git a/src/workqueue.c b/src/workqueue.c index 0b1a9ea..14957a0 100644 --- a/src/workqueue.c +++ b/src/workqueue.c @@ -244,11 +244,12 @@ static void *workqueue_thread(void *arg) * urcu_work list. */ cmm_smp_mb(); - } else { - (void) poll(NULL, 0, 10); } } else { - (void) poll(NULL, 0, 10); + if (cds_wfcq_empty(&workqueue->cbs_head, + &workqueue->cbs_tail)) { + (void) poll(NULL, 0, 10); + } } if (workqueue->worker_after_wake_up_fct) workqueue->worker_after_wake_up_fct(workqueue, workqueue->priv);