From: Willy Tarreau Date: Wed, 22 May 2019 04:42:27 +0000 (+0200) Subject: CLEANUP: threads: really move thread_info to hathreads.c X-Git-Tag: v2.0-dev4~30 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=05ed14cfc453dce2efe4e0f1df9d3259f2871c3d;p=thirdparty%2Fhaproxy.git CLEANUP: threads: really move thread_info to hathreads.c 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. --- diff --git a/src/haproxy.c b/src/haproxy.c index 923b92327c..9e5f69a144 100644 --- a/src/haproxy.c +++ b/src/haproxy.c @@ -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 = { diff --git a/src/hathreads.c b/src/hathreads.c index b159d5eb39..b25417cc89 100644 --- a/src/hathreads.c +++ b/src/hathreads.c @@ -29,7 +29,7 @@ #include #include -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