mirror of
https://github.com/haproxy/haproxy.git
synced 2026-04-21 14:17:30 -04:00
MINOR: task: detect self-wakeups on tl==sched->current instead of TASK_RUNNING
This is exactly what we want to detect (a task/tasklet waking itself), so let's use the proper condition for this.
This commit is contained in:
parent
d23d413e38
commit
b30a153cd1
1 changed files with 1 additions and 1 deletions
|
|
@ -248,7 +248,7 @@ static inline void tasklet_wakeup(struct tasklet *tl)
|
|||
if (tl->state & TASK_SELF_WAKING) {
|
||||
LIST_ADDQ(&task_per_thread[tid].tasklets[TL_BULK], &tl->list);
|
||||
}
|
||||
else if (tl->state & TASK_RUNNING) {
|
||||
else if ((struct task *)tl == sched->current) {
|
||||
_HA_ATOMIC_OR(&tl->state, TASK_SELF_WAKING);
|
||||
LIST_ADDQ(&task_per_thread[tid].tasklets[TL_BULK], &tl->list);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue