]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: threads: Initialize the sync-point
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 31 Oct 2017 16:30:12 +0000 (17:30 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 31 Oct 2017 17:03:06 +0000 (18:03 +0100)
The sync point must be initialized before starting threads. This line was lost
in one of merges preparing the threads support integration.

src/haproxy.c

index 2d2d8772398b43eb5f7893a30c9f15c4cb8935ac..ed6c8ba8dfe374e007a5c0c8a16f09540fd1c9e8 100644 (file)
@@ -2806,6 +2806,8 @@ int main(int argc, char **argv)
                pthread_t    *threads = calloc(global.nbthread, sizeof(pthread_t));
                int          i;
 
+               THREAD_SYNC_INIT((1UL << global.nbthread) - 1);
+
                /* Init tids array */
                for (i = 0; i < global.nbthread; i++)
                        tids[i] = i;