diff options
author | Wilco Dijkstra <wdijkstr@arm.com> | 2022-09-26 16:58:08 +0100 |
---|---|---|
committer | Wilco Dijkstra <wdijkstr@arm.com> | 2022-09-26 16:58:08 +0100 |
commit | 22f4ab2d200f605441cdd2b49ec9c97d43eb11c9 (patch) | |
tree | 900238f342a45d6c899cad578d58546336ffe5b9 /sysdeps/nptl | |
parent | c02e29a0ba47d636281e1a026444a1a0a254aa12 (diff) | |
download | glibc-22f4ab2d200f605441cdd2b49ec9c97d43eb11c9.tar.gz glibc-22f4ab2d200f605441cdd2b49ec9c97d43eb11c9.tar.xz glibc-22f4ab2d200f605441cdd2b49ec9c97d43eb11c9.zip |
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 'sysdeps/nptl')
-rw-r--r-- | sysdeps/nptl/futex-internal.h | 2 | ||||
-rw-r--r-- | sysdeps/nptl/lowlevellock.h | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/sysdeps/nptl/futex-internal.h b/sysdeps/nptl/futex-internal.h index cf54c27ed9..f64728b398 100644 --- a/sysdeps/nptl/futex-internal.h +++ b/sysdeps/nptl/futex-internal.h @@ -319,7 +319,7 @@ __futex_clocklock64 (int *futex, clockid_t clockid, { if (__glibc_unlikely (atomic_compare_and_exchange_bool_acq (futex, 1, 0))) { - while (atomic_exchange_acq (futex, 2) != 0) + while (atomic_exchange_acquire (futex, 2) != 0) { int err = 0; err = __futex_abstimed_wait64 ((unsigned int *) futex, 2, clockid, diff --git a/sysdeps/nptl/lowlevellock.h b/sysdeps/nptl/lowlevellock.h index b429d9aa78..29aa9adb89 100644 --- a/sysdeps/nptl/lowlevellock.h +++ b/sysdeps/nptl/lowlevellock.h @@ -119,7 +119,7 @@ libc_hidden_proto (__lll_lock_wait) ((void) \ ({ \ int *__futex = (futex); \ - if (__glibc_unlikely (atomic_exchange_acq (__futex, 2) != 0)) \ + if (__glibc_unlikely (atomic_exchange_acquire (__futex, 2) != 0)) \ __lll_lock_wait (__futex, private); \ })) #define lll_cond_lock(futex, private) __lll_cond_lock (&(futex), private) @@ -147,7 +147,7 @@ libc_hidden_proto (__lll_lock_wake) ({ \ int *__futex = (futex); \ int __private = (private); \ - int __oldval = atomic_exchange_rel (__futex, 0); \ + int __oldval = atomic_exchange_release (__futex, 0); \ if (__glibc_unlikely (__oldval > 1)) \ { \ if (__builtin_constant_p (private) && (private) == LLL_PRIVATE) \ |