]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: task: remove the now unused TASK_GLOBAL flag
authorWilly Tarreau <w@1wt.eu>
Thu, 16 Jun 2022 14:05:02 +0000 (16:05 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 1 Jul 2022 17:15:14 +0000 (19:15 +0200)
TASK_GLOBAL was exclusively used by task_unlink_rq(), as such it can be
dropped.

dev/flags/flags.c
include/haproxy/task-t.h
src/task.c

index 620a669844f52af0d386b2b865a9878d0dc09ccb..733113da36fc58cd0923b0c47746e1352291c2cf 100644 (file)
@@ -284,7 +284,6 @@ void show_task_state(unsigned int f)
        SHOW_FLAG(f, TASK_KILLED);
        SHOW_FLAG(f, TASK_SELF_WAKING);
        SHOW_FLAG(f, TASK_QUEUED);
-       SHOW_FLAG(f, TASK_GLOBAL);
        SHOW_FLAG(f, TASK_RUNNING);
 
        if (f) {
index 22d7b373cbc58e49bb5581fda221f8b2aacaf38c..7808446bf7d7249dbba57f8121190ad6c4ae5a0a 100644 (file)
@@ -32,7 +32,7 @@
 /* values for task->state (32 bits) */
 #define TASK_SLEEPING     0x00000000  /* task sleeping */
 #define TASK_RUNNING      0x00000001  /* the task is currently running */
-#define TASK_GLOBAL       0x00000002  /* The task is currently in the global runqueue */
+/* unused                 0x00000002 */
 #define TASK_QUEUED       0x00000004  /* The task has been (re-)added to the run queue */
 /* unused                 0x00000008 */
 #define TASK_SELF_WAKING  0x00000010  /* task/tasklet found waking itself */
index eac03fe752deee865d761d53a359746718c0d99d..b371b89a9cc96fd7a7bca4471f6e44d3d5977b11 100644 (file)
@@ -267,7 +267,6 @@ void __task_wakeup(struct task *t)
 
 #ifdef USE_THREAD
        if (thr != tid) {
-               _HA_ATOMIC_OR(&t->state, TASK_GLOBAL);
                HA_SPIN_UNLOCK(TASK_RQ_LOCK, &rq_lock);
 
                /* If all threads that are supposed to handle this task are sleeping,
@@ -873,7 +872,6 @@ void process_runnable_tasks()
                else {
                        t = eb32sc_entry(grq, struct task, rq);
                        grq = eb32sc_next(grq, tid_bit);
-                       _HA_ATOMIC_AND(&t->state, ~TASK_GLOBAL);
                        eb32sc_delete(&t->rq);
 
                        if (unlikely(!grq)) {