mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-26 04:31:03 +00:00
(allocate_stack): Assume atomic_exchange_and_add returns the old value.
This commit is contained in:
parent
bfd49d5558
commit
91958edc84
@ -400,7 +400,8 @@ allocate_stack (const struct pthread_attr *attr, struct pthread **pdp,
|
||||
|
||||
#if COLORING_INCREMENT != 0
|
||||
/* Atomically increment NCREATED. */
|
||||
unsigned int ncreated = atomic_exchange_and_add (&nptl_ncreated, 1);
|
||||
unsigned int ncreated = (atomic_exchange_and_add (&nptl_ncreated, 1)
|
||||
+ 1);
|
||||
|
||||
/* We chose the offset for coloring by incrementing it for
|
||||
every new thread by a fixed amount. The offset used
|
||||
|
Loading…
Reference in New Issue
Block a user