diff options
Diffstat (limited to 'sysdeps/nptl')
-rw-r--r-- | sysdeps/nptl/libc_start_call_main.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sysdeps/nptl/libc_start_call_main.h b/sysdeps/nptl/libc_start_call_main.h index a9e85f2..c10a16b 100644 --- a/sysdeps/nptl/libc_start_call_main.h +++ b/sysdeps/nptl/libc_start_call_main.h @@ -65,7 +65,7 @@ __libc_start_call_main (int (*main) (int, char **, char ** MAIN_AUXVEC_DECL), /* One less thread. Decrement the counter. If it is zero we terminate the entire process. */ result = 0; - if (! atomic_decrement_and_test (&__nptl_nthreads)) + if (atomic_fetch_add_relaxed (&__nptl_nthreads, -1) != 1) /* Not much left to do but to exit the thread, not the process. */ while (1) INTERNAL_SYSCALL_CALL (exit, 0); |