CLEANUP: task: remove the now unused TASK_GLOBAL flag

TASK_GLOBAL was exclusively used by task_unlink_rq(), as such it can be
dropped.
This commit is contained in:
Willy Tarreau 2022-06-16 16:05:02 +02:00
parent 3961608f63
commit fc5de15baa
3 changed files with 1 additions and 4 deletions

View 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) {

View 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 */

View 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)) {