]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/BUILD: threads: unbreak build without threads
authorWilliam Lallemand <wlallemand@haproxy.com>
Sun, 24 Jun 2018 07:37:03 +0000 (09:37 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 26 Jun 2018 12:15:12 +0000 (14:15 +0200)
The build without threads was once again broken.

This issue was introduced in commit ba86c6c ("MINOR: threads: Be sure to
remove threads from all_threads_mask on exit").

This is exactly the same problem as last time it happened, because of
all_threads_mask not being defined with USE_THREAD=

This must be backported in 1.8

src/haproxy.c

index 11d1d47ceb41b01c793fd81771429912aaac5de3..4101cefa1b29e484f70e7fc85042cefc6eee8fd3 100644 (file)
@@ -2473,9 +2473,8 @@ static void *run_thread_poll_loop(void *data)
        list_for_each_entry(ptdf, &per_thread_deinit_list, list)
                ptdf->fct();
 
-       HA_ATOMIC_AND(&all_threads_mask, ~tid_bit);
-
 #ifdef USE_THREAD
+       HA_ATOMIC_AND(&all_threads_mask, ~tid_bit);
        if (tid > 0)
                pthread_exit(NULL);
 #endif