From: Jérémie Galarneau Date: Fri, 7 Dec 2018 22:06:36 +0000 (-0500) Subject: Fix: mixup between URCU_WORKQUEUE_RT and URCU_CALL_RCU_RT X-Git-Tag: v0.11.0~35 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=9db9edccbed8465728f0bd9db12e03bd6f291726;p=urcu.git Fix: mixup between URCU_WORKQUEUE_RT and URCU_CALL_RCU_RT The work queue implementation is derived from the call-rcu thread. A number of references seem to have been left in place when adapting the code for its new purpose. The URCU_CALL_RCU_RT flag is used by wake_worker_thread() while the rest of the workqueue.c code uses URCU_WORKQUEUE_RT to determine if the work queue was configured in real-time mode. Both flags are defined to the same value (0x1) and the current internal user of the work queue (lfht) never specifies any flags. In practice, this does not cause any problem, but this mixup should be fixed nevertheless. Signed-off-by: Jérémie Galarneau Signed-off-by: Mathieu Desnoyers --- diff --git a/src/workqueue.c b/src/workqueue.c index 17ea835..8561a7a 100644 --- a/src/workqueue.c +++ b/src/workqueue.c @@ -309,7 +309,7 @@ struct urcu_workqueue *urcu_workqueue_create(unsigned long flags, static void wake_worker_thread(struct urcu_workqueue *workqueue) { - if (!(_CMM_LOAD_SHARED(workqueue->flags) & URCU_CALL_RCU_RT)) + if (!(_CMM_LOAD_SHARED(workqueue->flags) & URCU_WORKQUEUE_RT)) futex_wake_up(&workqueue->futex); }