From: Olivier Houchard Date: Fri, 17 Aug 2018 16:57:51 +0000 (+0200) Subject: BUG/MEDIUM: tasklets: Add the thread as active when waking a tasklet. X-Git-Tag: v1.9-dev2~138 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=abedf5f6c37a4f21cf9c68e1e0f408218eb54a84;p=thirdparty%2Fhaproxy.git BUG/MEDIUM: tasklets: Add the thread as active when waking a tasklet. Set the flag for the current thread in active_threads_mask when waking a tasklet, or we will never run it if no tasks are available. This is 1.9-specific, no backport is needed. --- diff --git a/include/proto/task.h b/include/proto/task.h index 13398c53e1..eef4ded436 100644 --- a/include/proto/task.h +++ b/include/proto/task.h @@ -226,6 +226,7 @@ static inline void tasklet_wakeup(struct tasklet *tl) return; LIST_ADDQ(&task_list[tid], &tl->list); task_list_size[tid]++; + HA_ATOMIC_OR(&active_tasks_mask, tid_bit); HA_ATOMIC_ADD(&tasks_run_queue, 1); }