From eba0c0b51dc665891d75cf879c1c53ee9519120b Mon Sep 17 00:00:00 2001 From: Olivier Houchard Date: Thu, 26 Jul 2018 18:53:28 +0200 Subject: [PATCH] MINOR: tasks: Make global_tasks_mask volatile. In order to make sure modifications are noticed by other threads when needed, make global_tasks_mask volatile. --- src/task.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/task.c b/src/task.c index e16920157..672730b8e 100644 --- a/src/task.c +++ b/src/task.c @@ -34,7 +34,7 @@ struct pool_head *pool_head_notification; unsigned int nb_tasks = 0; volatile unsigned long active_tasks_mask = 0; /* Mask of threads with active tasks */ -unsigned long global_tasks_mask = 0; /* Mask of threads with tasks in the global runqueue */ +volatile unsigned long global_tasks_mask = 0; /* Mask of threads with tasks in the global runqueue */ unsigned int tasks_run_queue = 0; unsigned int tasks_run_queue_cur = 0; /* copy of the run queue size */ unsigned int nb_tasks_cur = 0; /* copy of the tasks count */