]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: thread: use ltid_bit in ha_tkillall()
authorWilly Tarreau <w@1wt.eu>
Mon, 27 Jun 2022 14:23:44 +0000 (16:23 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 1 Jul 2022 17:15:15 +0000 (19:15 +0200)
Since commit cc7a11ee3 ("MINOR: threads: set the tid, ltid and their bit
in thread_cfg") we ought not use (1UL << thr) to get the group mask for
thread <thr>, but (ha_thread_info[thr].ltid_bit). ha_tkillall() needs
this.

src/thread.c

index d895bbcdab5ff3246b5e083a999d2a350b8df426..6f81f96a13812663f5deae9b85d6c0e3543c0f42 100644 (file)
@@ -315,7 +315,7 @@ void ha_tkillall(int sig)
        unsigned int thr;
 
        for (thr = 0; thr < global.nbthread; thr++) {
-               if (!(all_threads_mask & (1UL << thr)))
+               if (!(tg->threads_enabled & ha_thread_info[thr].ltid_bit))
                        continue;
                if (thr == tid)
                        continue;