From: Willy Tarreau Date: Thu, 16 Jun 2022 14:05:02 +0000 (+0200) Subject: CLEANUP: task: remove the now unused TASK_GLOBAL flag X-Git-Tag: v2.7-dev2~146 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fc5de15baa8c4436eb36596deac9b083ff5f6418;p=thirdparty%2Fhaproxy.git CLEANUP: task: remove the now unused TASK_GLOBAL flag TASK_GLOBAL was exclusively used by task_unlink_rq(), as such it can be dropped. --- diff --git a/dev/flags/flags.c b/dev/flags/flags.c index 620a669844..733113da36 100644 --- a/dev/flags/flags.c +++ b/dev/flags/flags.c @@ -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) { diff --git a/include/haproxy/task-t.h b/include/haproxy/task-t.h index 22d7b373cb..7808446bf7 100644 --- a/include/haproxy/task-t.h +++ b/include/haproxy/task-t.h @@ -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 */ diff --git a/src/task.c b/src/task.c index eac03fe752..b371b89a9c 100644 --- a/src/task.c +++ b/src/task.c @@ -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)) {