]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MAJOR: task: replace t->thread_mask with 1<<t->tid when thread mask is needed
authorWilly Tarreau <w@1wt.eu>
Wed, 15 Jun 2022 13:44:00 +0000 (15:44 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 1 Jul 2022 17:15:14 +0000 (19:15 +0200)
commitc44d08ebc4eb5309f5e37d24012efee9145a20d7
treee731ab6e5878eefef84bfa197baef530845f54eb
parent29ffe267337b2a1818a714decd9da800c12823dc
MAJOR: task: replace t->thread_mask with 1<<t->tid when thread mask is needed

At a few places where the task's thread mask. Now we know that it's always
either one bit or all bits of all_threads_mask, so we can replace it with
either 1<<tid or all_threads_mask depending on what's expected.

It's worth noting that the global_tasks_mask is still set this way and
that it's reaching its limits. Similarly, the task_new() API would deserve
an update to stop using a thread mask and use a thread number instead.
Similarly, task_set_affinity() should be updated to directly take a
thread number.

At this point the task's thread mask is not used anymore.
src/task.c