From 9b03c0c9a74a86f00fdce6823ff71bd663ce658f Mon Sep 17 00:00:00 2001 From: Olivier Houchard Date: Thu, 26 Jul 2018 18:45:22 +0200 Subject: [PATCH] MINOR: tasks: Make active_tasks_mask volatile. To be sure we have the relevant informations, make active_tasks_mask volatile --- include/proto/task.h | 2 +- src/task.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/proto/task.h b/include/proto/task.h index fe4699ab2..cb3f9af43 100644 --- a/include/proto/task.h +++ b/include/proto/task.h @@ -83,7 +83,7 @@ /* a few exported variables */ extern unsigned int nb_tasks; /* total number of tasks */ -extern unsigned long active_tasks_mask; /* Mask of threads with active tasks */ +extern volatile unsigned long active_tasks_mask; /* Mask of threads with active tasks */ extern unsigned int tasks_run_queue; /* run queue size */ extern unsigned int tasks_run_queue_cur; extern unsigned int nb_tasks_cur; diff --git a/src/task.c b/src/task.c index 11255c306..e16920157 100644 --- a/src/task.c +++ b/src/task.c @@ -33,7 +33,7 @@ struct pool_head *pool_head_tasklet; struct pool_head *pool_head_notification; unsigned int nb_tasks = 0; -unsigned long active_tasks_mask = 0; /* Mask of threads with active tasks */ +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 */ unsigned int tasks_run_queue = 0; unsigned int tasks_run_queue_cur = 0; /* copy of the run queue size */