]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: init/threads: remove the useless tids[] array
authorWilly Tarreau <w@1wt.eu>
Fri, 3 May 2019 07:27:30 +0000 (09:27 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 3 May 2019 07:59:15 +0000 (09:59 +0200)
commitb4f7cc3839dfe826cbcf937d54ea2e6dcd9ba621
treef5c5efa8f774a9acfc2346367acc33fc6e034aec
parent81492c989c3898d8492a8d6050a97eccf261107f
MINOR: init/threads: remove the useless tids[] array

It's still obscure how we managed to initialize an array of integers
with values always equal to the index, just to retrieve the value
from an opaque pointer to the index instead of directly using it! I
suspect it's a leftover from the very early threading experiments.

This commit gets rid of this and simply passes the thread ID as the
argument to run_thread_poll_loop(), thus significantly simplifying the
few call places and removing the need to allocate then free an array
of identity.
src/haproxy.c