]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: tasks: Make active_tasks_mask volatile.
authorOlivier Houchard <ohouchard@haproxy.com>
Thu, 26 Jul 2018 16:45:22 +0000 (18:45 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 26 Jul 2018 17:09:50 +0000 (19:09 +0200)
To be sure we have the relevant informations, make active_tasks_mask volatile

include/proto/task.h
src/task.c

index fe4699ab2e1e53cfa48812cdf69ef399522b8020..cb3f9af43fd9d2ac4bc82fc20eae3e4785dfcdd1 100644 (file)
@@ -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;
index 11255c306a82454c8cfa4553a67f8fae8c3baac3..e1692015722a0cdfb9c880b07f51ef5aa16639fa 100644 (file)
@@ -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 */