From: Ulrich Drepper Date: Wed, 8 Sep 2004 06:11:35 +0000 (+0000) Subject: (__pthread_once): Use atomic_increment instead of atomic_exchange_and_add. X-Git-Tag: glibc-2.16-ports-before-merge~1134 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=493814089be51ba1c5752a45cbb1d4abe8941a83;p=thirdparty%2Fglibc.git (__pthread_once): Use atomic_increment instead of atomic_exchange_and_add. --- diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/pthread_once.c b/sysdeps/unix/sysv/linux/alpha/nptl/pthread_once.c index 82f72de8b3d..79a3c47aed8 100644 --- a/sysdeps/unix/sysv/linux/alpha/nptl/pthread_once.c +++ b/sysdeps/unix/sysv/linux/alpha/nptl/pthread_once.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 Free Software Foundation, Inc. +/* Copyright (C) 2003, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -85,7 +85,7 @@ __pthread_once (pthread_once_t *once_control, void (*init_routine) (void)) pthread_cleanup_pop (0); /* Add one to *once_control to take the bottom 2 bits from 01 to 10. */ - atomic_exchange_and_add (once_control, 1); + atomic_increment (once_control); /* Wake up all other threads. */ lll_futex_wake (once_control, INT_MAX);