]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: tasks: Don't set the TASK_RUNNING flag when adding in the tasklet list.
authorOlivier Houchard <ohouchard@haproxy.com>
Wed, 17 Apr 2019 17:14:56 +0000 (19:14 +0200)
committerOlivier Houchard <cognet@ci0.org>
Wed, 17 Apr 2019 17:28:01 +0000 (19:28 +0200)
Now that TASK_QUEUED is enforced, there's no need to set TASK_RUNNING when
removing the task from the runqueue to add it to the tasklet list. The flag
will only be set right before we run the task.

src/task.c

index a9c501abbe4c49929eb2726949bf960022c22d28..abcb13baa0ac46266d3906018b5e5b36d654cff4 100644 (file)
@@ -342,9 +342,6 @@ void process_runnable_tasks()
                }
 #endif
 
-               /* Make sure nobody re-adds the task in the runqueue */
-               _HA_ATOMIC_OR(&t->state, TASK_RUNNING);
-
                /* And add it to the local task list */
                task_insert_into_tasklet_list(t);
        }