]> git.ipfire.org Git - thirdparty/haproxy.git/commit
CLEANUP: task: move tid and wake_date into the common part
authorWilly Tarreau <w@1wt.eu>
Wed, 7 Sep 2022 14:43:01 +0000 (16:43 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 8 Sep 2022 12:30:38 +0000 (14:30 +0200)
commite0e6d81460e2458c092146d31335cc1d76fe824f
tree9ac605b3471471003b1d89fe9c0220db0972d277
parent2830d282e59068b6c2d0c82ce473ec5251e7a2b0
CLEANUP: task: move tid and wake_date into the common part

There used to be one tid for tasklets and a thread_mask for tasks. Since
2.7, both tasks and tasklets now use a tid (albeit with a very slight
semantic difference for the negative value), to in order to limit code
duplication and to ease debugging it makes sense to move tid into the
common part. One limitation is that it will leave a hole in the structure,
but we now have the wake_date that is always present and can move there as
well to plug the hole.

This results in something overall pretty clean (and cleaner than before),
with the low-level stuff (state,tid,process,context) appearing first, then
the caller stuff (caller,wake_date,calls,debug) next, and finally the
type-specific stuff (rq/wq/expire/nice).
include/haproxy/task-t.h