46 lines
1.6 KiB
Diff
46 lines
1.6 KiB
Diff
|
|
From 0aa1fccd3aff5f5a7717c166f7bfbe864d041f23 Mon Sep 17 00:00:00 2001
|
||
|
|
From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Galarneau?=
|
||
|
|
<jeremie.galarneau@efficios.com>
|
||
|
|
Date: Fri, 7 Dec 2018 17:06:36 -0500
|
||
|
|
Subject: [PATCH 05/15] Fix: mixup between URCU_WORKQUEUE_RT and
|
||
|
|
URCU_CALL_RCU_RT
|
||
|
|
MIME-Version: 1.0
|
||
|
|
Content-Type: text/plain; charset=UTF-8
|
||
|
|
Content-Transfer-Encoding: 8bit
|
||
|
|
|
||
|
|
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 <jeremie.galarneau@efficios.com>
|
||
|
|
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
|
||
|
|
---
|
||
|
|
src/workqueue.c | 2 +-
|
||
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||
|
|
|
||
|
|
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);
|
||
|
|
}
|
||
|
|
|
||
|
|
--
|
||
|
|
2.19.1
|
||
|
|
|