]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: threads: really move thread_info to hathreads.c
authorWilly Tarreau <w@1wt.eu>
Wed, 22 May 2019 04:42:27 +0000 (06:42 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 22 May 2019 09:50:48 +0000 (11:50 +0200)
Commit 5a6e2245f ("REORG: threads: move the struct thread_info from
global.h to hathreads.h") didn't hold its promise well, as the thread_info
struct was still declared and initialized in haproxy.c in addition to being
in hathreads.c. Let's move it for real now.

src/haproxy.c
src/hathreads.c

index 923b92327c3870afb94c2d3855ba34737838be6e..9e5f69a144ef70b82ede424eeca6633b2e21ef47 100644 (file)
@@ -138,8 +138,6 @@ int  relative_pid = 1;              /* process id starting at 1 */
 unsigned long pid_bit = 1;      /* bit corresponding to the process id */
 unsigned long all_proc_mask = 1; /* mask of all processes */
 
-struct thread_info thread_info[MAX_THREADS] = { };
-
 volatile unsigned long sleeping_thread_mask; /* Threads that are about to sleep in poll() */
 /* global options */
 struct global global = {
index b159d5eb39f6c17df3059cf4359bfa9a8589a8fd..b25417cc89b9072b42f17510e58b0ef059bfe09a 100644 (file)
@@ -29,7 +29,7 @@
 #include <types/global.h>
 #include <proto/fd.h>
 
-struct thread_info thread_info[MAX_THREADS];
+struct thread_info thread_info[MAX_THREADS] = { };
 THREAD_LOCAL struct thread_info *ti = &thread_info[0];
 
 #ifdef USE_THREAD