aboutsummaryrefslogtreecommitdiff
path: root/nptl
diff options
context:
space:
mode:
authorWilco Dijkstra <wdijkstr@arm.com>2022-09-26 16:58:08 +0100
committerWilco Dijkstra <wdijkstr@arm.com>2022-09-26 16:58:08 +0100
commit22f4ab2d200f605441cdd2b49ec9c97d43eb11c9 (patch)
tree900238f342a45d6c899cad578d58546336ffe5b9 /nptl
parentc02e29a0ba47d636281e1a026444a1a0a254aa12 (diff)
downloadglibc-22f4ab2d200f605441cdd2b49ec9c97d43eb11c9.zip
glibc-22f4ab2d200f605441cdd2b49ec9c97d43eb11c9.tar.gz
glibc-22f4ab2d200f605441cdd2b49ec9c97d43eb11c9.tar.bz2
Use atomic_exchange_release/acquire
Rename atomic_exchange_rel/acq to use atomic_exchange_release/acquire since these map to the standard C11 atomic builtins. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'nptl')
-rw-r--r--nptl/pthread_create.c2
-rw-r--r--nptl/pthread_mutex_unlock.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/nptl/pthread_create.c b/nptl/pthread_create.c
index 54afee5..32ae2f4 100644
--- a/nptl/pthread_create.c
+++ b/nptl/pthread_create.c
@@ -415,7 +415,7 @@ start_thread (void *arg)
unwind_buf.priv.data.cleanup = NULL;
/* Allow setxid from now onwards. */
- if (__glibc_unlikely (atomic_exchange_acq (&pd->setxid_futex, 0) == -2))
+ if (__glibc_unlikely (atomic_exchange_acquire (&pd->setxid_futex, 0) == -2))
futex_wake (&pd->setxid_futex, 1, FUTEX_PRIVATE);
if (__glibc_likely (! not_first_call))
diff --git a/nptl/pthread_mutex_unlock.c b/nptl/pthread_mutex_unlock.c
index db99175..27c5f53 100644
--- a/nptl/pthread_mutex_unlock.c
+++ b/nptl/pthread_mutex_unlock.c
@@ -171,7 +171,7 @@ __pthread_mutex_unlock_full (pthread_mutex_t *mutex, int decr)
The unlock operation must be the last access to the mutex to not
violate the mutex destruction requirements (see __lll_unlock). */
private = PTHREAD_ROBUST_MUTEX_PSHARED (mutex);
- if (__glibc_unlikely ((atomic_exchange_rel (&mutex->__data.__lock, 0)
+ if (__glibc_unlikely ((atomic_exchange_release (&mutex->__data.__lock, 0)
& FUTEX_WAITERS) != 0))
futex_wake ((unsigned int *) &mutex->__data.__lock, 1, private);