]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: tasks: Provide the tasklet to the callback.
authorOlivier Houchard <cognet@ci0.org>
Tue, 17 Mar 2020 17:15:04 +0000 (18:15 +0100)
committerOlivier Houchard <cognet@ci0.org>
Tue, 17 Mar 2020 17:52:33 +0000 (18:52 +0100)
commitc62d9ab7cb65fc9d0c7383dbb46e123da096385d
treee680835e9b3b07467b13327099bfbc213c118adf
parent909086ea61c985bce9ac4d015e47eeb45586a6de
MINOR: tasks: Provide the tasklet to the callback.

When tasklet were introduced, it has been decided not to provide the tasklet
to the callback, but NULL instead. While it may have been reasonable back
then, maybe to be able to differentiate a task from a tasklet from the
callback, it also means that we can't access the tasklet from the handler if
the context provided can't be trusted.
As no handler is shared between a task and a tasklet, and there are now
other means of distinguishing between task and tasklet, just pass the
tasklet pointer too.

This may be backported to 2.1, 2.0 and 1.9 if needed.
src/task.c