summaryrefslogtreecommitdiff
path: root/nptl/allocatestack.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-09-08 06:09:02 +0000
committerUlrich Drepper <drepper@redhat.com>2004-09-08 06:09:02 +0000
commit7ba0e52c39ae2a57933a856ce363ab0361ad1ed9 (patch)
treeaaabd4f3d63a9a27d7c8f4fb1105bcc3c5ef26a2 /nptl/allocatestack.c
parentf510d815bec80c004b194aaf4847fa40069cfd18 (diff)
Update.
* sysdeps/powerpc/bits/atomic.h (atomic_increment): Define. (atomic_decrement): Define. * sysdeps/powerpc/bits/atomic.h: Implement atomic_increment_val and atomic_decrement_val. * sysdeps/powerpc/powerpc32/bits/atomic.h: Likewise. * sysdeps/powerpc/powerpc64/bits/atomic.h: Likewise. * csu/tst-atomic.c (do_test): Add tests of atomic_increment_val and atomic_decrement_val.
Diffstat (limited to 'nptl/allocatestack.c')
-rw-r--r--nptl/allocatestack.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/nptl/allocatestack.c b/nptl/allocatestack.c
index 33fbbaa850..59f00d9231 100644
--- a/nptl/allocatestack.c
+++ b/nptl/allocatestack.c
@@ -445,8 +445,7 @@ 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)
- + 1);
+ unsigned int ncreated = atomic_increment_val (&nptl_ncreated);
/* We chose the offset for coloring by incrementing it for
every new thread by a fixed amount. The offset used