(allocate_stack): Assume atomic_exchange_and_add returns the old value.

This commit is contained in:
Ulrich Drepper 2003-03-20 08:58:35 +00:00
parent bfd49d5558
commit 91958edc84

View File

@ -400,7 +400,8 @@ allocate_stack (const struct pthread_attr *attr, struct pthread **pdp,
#if COLORING_INCREMENT != 0 #if COLORING_INCREMENT != 0
/* Atomically increment NCREATED. */ /* 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 /* We chose the offset for coloring by incrementing it for
every new thread by a fixed amount. The offset used every new thread by a fixed amount. The offset used