]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: task: add and preset a thread ID in the task struct
authorWilly Tarreau <w@1wt.eu>
Wed, 15 Jun 2022 12:19:48 +0000 (14:19 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 1 Jul 2022 17:15:14 +0000 (19:15 +0200)
commit6ef52f44799dde7587037672e20e3ca8183ecfb7
treec01dd20c92400dbb817a338bbbab29b430f46651
parent8e5c53a6c922ab69b0d0a58cde0a08d2e833a3d4
MEDIUM: task: add and preset a thread ID in the task struct

The tasks currently rely on a mask but do not have an assigned thread ID,
contrary to tasklets. However, in practice they're either running on a
single thread or on any thread, so that it will be worth simplifying all
this in order to ease the transition to the thread groups.

This patch introduces a "tid" field in the task struct, that's either
the number of the thread the task is attached to, or a negative value
if the task is not bound to a thread, (i.e. its mask is all_threads_mask).

The new ID is only set and updated but not used yet.
include/haproxy/task-t.h
include/haproxy/task.h
src/hlua.c
src/stream.c