]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: task: Add tasklet_wakeup_after()
authorFrédéric Lécaille <flecaille@haproxy.com>
Wed, 29 Jun 2022 08:53:03 +0000 (10:53 +0200)
committerFrédéric Lécaille <flecaille@haproxy.com>
Thu, 30 Jun 2022 12:24:04 +0000 (14:24 +0200)
commitad548b54a7a56b16dcf51f853b345cf1565dcb24
tree2e19be6418a5fa2932dd5555e9f2a90b0408dbd2
parenta7a4c80adefe8c8934093a874f5557d61f0c995d
MINOR: task: Add tasklet_wakeup_after()

We want to be able to schedule a tasklet onto a thread after the current tasklet
is done. What we have to do is to insert this tasklet at the head of the thread
task list. Furthermore, we would like to serialize the tasklets. They must be
run in the same order as the order in which they have been scheduled. This is
implemented passing a list of tasklet as parameter (see <head> parameters) which
must be reused for subsequent calls.
_tasklet_wakeup_after_on() is implemented to accomplish this job.
tasklet_wakeup_after_on() and tasklet_wake_after() are only wrapper macros around
_tasklet_wakeup_after_on(). tasklet_wakeup_after_on() does exactly the same thing
as _tasklet_wakeup_after_on() without having to pass the filename and line in the
filename as parameters (usefull when DEBUG_TASK is enabled).
tasklet_wakeup_after() hides also the usage of the thread parameter which is
<tl> tasklet thread ID.
include/haproxy/task.h
src/task.c