]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: task: make task_instant_wakeup() explicitly call _tasklet_wakeup_here()
authorWilly Tarreau <w@1wt.eu>
Wed, 24 Jun 2026 14:04:59 +0000 (16:04 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 24 Jun 2026 17:08:00 +0000 (19:08 +0200)
This patch moves the tid check upper in the chain, in task_instant_wakeup()
so as to branch to _tasklet_wakeup_here() for run-anywhere tasks, or
_tasklet_wakeup_on() for designated threads.

At this point there is no longer any direct caller of __tasklet_wakeup_on()
passing a negative thread value.

include/haproxy/task.h

index aa8718f14f03d56919a8f87741540f9a3c6144a7..3da256d11141bceeb662d5425add5b77cffde959 100644 (file)
@@ -581,7 +581,10 @@ static inline void _task_instant_wakeup(struct task *t, unsigned int f, const st
 #endif
        }
 
-       __tasklet_wakeup_on((struct tasklet *)t, thr);
+       if (thr < 0)
+               __tasklet_wakeup_here((struct tasklet *)t);
+       else
+               __tasklet_wakeup_on((struct tasklet *)t, thr);
 }
 
 /* schedules tasklet <tl> to run immediately after the current one is done