mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-21 22:01:31 +02:00
MINOR: threads: Use __decl_hathreads instead of #ifdef/#endif
A #ifdef/#endif on USE_THREAD was added in the commit 0048dd04 ("MINOR: threads: Fix build when we're not compiling with threads.") to conditionally define the start_lock variable, because HA_SPINLOCK_T is only defined when HAProxy is compiled with threads. If fact, to do that, we should use the macro __decl_hathreads instead. If commit 0048dd04 is backported in 1.8, this one can also be backported.
This commit is contained in:
parent
13b007d583
commit
da18b9db7b
@ -2422,9 +2422,7 @@ static void *run_thread_poll_loop(void *data)
|
|||||||
{
|
{
|
||||||
struct per_thread_init_fct *ptif;
|
struct per_thread_init_fct *ptif;
|
||||||
struct per_thread_deinit_fct *ptdf;
|
struct per_thread_deinit_fct *ptdf;
|
||||||
#ifdef USE_THREAD
|
__decl_hathreads(static HA_SPINLOCK_T start_lock);
|
||||||
static HA_SPINLOCK_T start_lock;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
tid = *((unsigned int *)data);
|
tid = *((unsigned int *)data);
|
||||||
tid_bit = (1UL << tid);
|
tid_bit = (1UL << tid);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user