MINOR: tasks: use MT_LIST_ADDQ() when killing tasks.
authorWilly Tarreau <w@1wt.eu>
Fri, 10 Jul 2020 06:32:10 +0000 (08:32 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 10 Jul 2020 06:52:13 +0000 (08:52 +0200)
commit950954f5f7dbf218f4100921e2660c357ed50ad3
tree42ed801bbaada7a4c158b22aa729516056d1048f
parenta9d7b76f6a5824fd2d36ce11fa0a1a1c504f1104
MINOR: tasks: use MT_LIST_ADDQ() when killing tasks.

A bug in task_kill() was fixed by commy 54d31170a ("BUG/MAJOR: sched:
make sure task_kill() always queues the task") which added a list
initialization before adding an element. But in fact an inconditional
addition would have done the same and been simpler than first
initializing then checking the element was initialized. Let's use
MT_LIST_ADDQ() there to add the task to kill into the shared queue
and kill the dirty LIST_INIT().
src/task.c