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 | |
parent | c02e29a0ba47d636281e1a026444a1a0a254aa12 (diff) | |
download | glibc-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>
31 files changed, 39 insertions, 39 deletions
diff --git a/assert/assert.c b/assert/assert.c index 564ae28..aa77e25 100644 --- a/assert/assert.c +++ b/assert/assert.c @@ -74,7 +74,7 @@ __assert_fail_base (const char *fmt, const char *assertion, const char *file, /* We have to free the old buffer since the application might catch the SIGABRT signal. */ - struct abort_msg_s *old = atomic_exchange_acq (&__abort_msg, buf); + struct abort_msg_s *old = atomic_exchange_acquire (&__abort_msg, buf); if (old != NULL) __munmap (old, old->size); diff --git a/hurd/hurdlock.c b/hurd/hurdlock.c index 4f3bd3e..ca407bd 100644 --- a/hurd/hurdlock.c +++ b/hurd/hurdlock.c @@ -89,7 +89,7 @@ __lll_abstimed_lock (void *ptr, while (1) { - if (atomic_exchange_acq ((int *)ptr, 2) == 0) + if (atomic_exchange_acquire ((int *)ptr, 2) == 0) return 0; else if (! valid_nanoseconds (tsp->tv_nsec)) return EINVAL; diff --git a/mach/lowlevellock.h b/mach/lowlevellock.h index a4f6af4..d0adbd4 100644 --- a/mach/lowlevellock.h +++ b/mach/lowlevellock.h @@ -78,7 +78,7 @@ extern kern_return_t __gsync_wait_intr || atomic_compare_and_exchange_bool_acq (__iptr, 1, 0) != 0) \ while (1) \ { \ - if (atomic_exchange_acq (__iptr, 2) == 0) \ + if (atomic_exchange_acquire (__iptr, 2) == 0) \ break; \ __lll_wait (__iptr, 2, __flags); \ } \ @@ -102,7 +102,7 @@ extern kern_return_t __gsync_wait_intr #define __lll_unlock(ptr, flags) \ ({ \ int *__iptr = (int *)(ptr); \ - if (atomic_exchange_rel (__iptr, 0) == 2) \ + if (atomic_exchange_release (__iptr, 0) == 2) \ __lll_wake (__iptr, (flags)); \ (void)0; \ }) diff --git a/malloc/malloc.c b/malloc/malloc.c index 67ac661..953183e 100644 --- a/malloc/malloc.c +++ b/malloc/malloc.c @@ -4718,7 +4718,7 @@ static void malloc_consolidate(mstate av) maxfb = &fastbin (av, NFASTBINS - 1); fb = &fastbin (av, 0); do { - p = atomic_exchange_acq (fb, NULL); + p = atomic_exchange_acquire (fb, NULL); if (p != 0) { do { { diff --git a/manual/llio.texi b/manual/llio.texi index 85201a4..1b801ee 100644 --- a/manual/llio.texi +++ b/manual/llio.texi @@ -2538,7 +2538,7 @@ aiocb64}, since the LFS transparently replaces the old interface. @c munmap ok @c THREAD_COPY_STACK_GUARD ok @c THREAD_COPY_POINTER_GUARD ok -@c atomic_exchange_acq ok +@c atomic_exchange_acquire ok @c lll_futex_wake ok @c deallocate_stack @asulock @ascuheap @aculock @acsmem @c lll_lock (state_cache_lock) @asulock @aculock @@ -2570,7 +2570,7 @@ aiocb64}, since the LFS transparently replaces the old interface. @c atomic_fetch_add_relaxed ok @c clone ok @c atomic_fetch_add_relaxed ok -@c atomic_exchange_acq ok +@c atomic_exchange_acquire ok @c lll_futex_wake ok @c deallocate_stack dup @c sched_setaffinity ok @@ -2590,7 +2590,7 @@ aiocb64}, since the LFS transparently replaces the old interface. @c start_thread ok @c HP_TIMING_NOW ok @c ctype_init @mtslocale -@c atomic_exchange_acq ok +@c atomic_exchange_acquire ok @c lll_futex_wake ok @c sigemptyset ok @c sigaddset ok diff --git a/manual/memory.texi b/manual/memory.texi index 23a039c..9d3398a 100644 --- a/manual/memory.texi +++ b/manual/memory.texi @@ -451,7 +451,7 @@ this function is in @file{stdlib.h}. @c clear_fastchunks ok @c unsorted_chunks dup ok @c fastbin dup ok -@c atomic_exchange_acq ok +@c atomic_exchange_acquire ok @c check_inuse_chunk dup ok/disabled @c chunk_at_offset dup ok @c chunksize dup ok 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); diff --git a/sysdeps/aarch64/nptl/tls.h b/sysdeps/aarch64/nptl/tls.h index 8d62b31..08aa2ef 100644 --- a/sysdeps/aarch64/nptl/tls.h +++ b/sysdeps/aarch64/nptl/tls.h @@ -98,7 +98,7 @@ typedef struct # define THREAD_GSCOPE_RESET_FLAG() \ do \ { int __res \ - = atomic_exchange_rel (&THREAD_SELF->header.gscope_flag, \ + = atomic_exchange_release (&THREAD_SELF->header.gscope_flag, \ THREAD_GSCOPE_FLAG_UNUSED); \ if (__res == THREAD_GSCOPE_FLAG_WAIT) \ lll_futex_wake (&THREAD_SELF->header.gscope_flag, 1, LLL_PRIVATE); \ diff --git a/sysdeps/alpha/nptl/tls.h b/sysdeps/alpha/nptl/tls.h index ddf7de0..8f5b69a 100644 --- a/sysdeps/alpha/nptl/tls.h +++ b/sysdeps/alpha/nptl/tls.h @@ -95,7 +95,7 @@ typedef struct #define THREAD_GSCOPE_RESET_FLAG() \ do \ { int __res \ - = atomic_exchange_rel (&THREAD_SELF->header.gscope_flag, \ + = atomic_exchange_release (&THREAD_SELF->header.gscope_flag, \ THREAD_GSCOPE_FLAG_UNUSED); \ if (__res == THREAD_GSCOPE_FLAG_WAIT) \ lll_futex_wake (&THREAD_SELF->header.gscope_flag, 1, LLL_PRIVATE); \ diff --git a/sysdeps/arc/nptl/tls.h b/sysdeps/arc/nptl/tls.h index 15adfc9..7fc6602 100644 --- a/sysdeps/arc/nptl/tls.h +++ b/sysdeps/arc/nptl/tls.h @@ -103,7 +103,7 @@ typedef struct #define THREAD_GSCOPE_RESET_FLAG() \ do \ { int __res \ - = atomic_exchange_rel (&THREAD_SELF->header.gscope_flag, \ + = atomic_exchange_release (&THREAD_SELF->header.gscope_flag, \ THREAD_GSCOPE_FLAG_UNUSED); \ if (__res == THREAD_GSCOPE_FLAG_WAIT) \ lll_futex_wake (&THREAD_SELF->header.gscope_flag, 1, LLL_PRIVATE); \ diff --git a/sysdeps/arm/nptl/tls.h b/sysdeps/arm/nptl/tls.h index 02d9be2..7657ca3 100644 --- a/sysdeps/arm/nptl/tls.h +++ b/sysdeps/arm/nptl/tls.h @@ -89,7 +89,7 @@ typedef struct #define THREAD_GSCOPE_RESET_FLAG() \ do \ { int __res \ - = atomic_exchange_rel (&THREAD_SELF->header.gscope_flag, \ + = atomic_exchange_release (&THREAD_SELF->header.gscope_flag, \ THREAD_GSCOPE_FLAG_UNUSED); \ if (__res == THREAD_GSCOPE_FLAG_WAIT) \ lll_futex_wake (&THREAD_SELF->header.gscope_flag, 1, LLL_PRIVATE); \ diff --git a/sysdeps/csky/nptl/tls.h b/sysdeps/csky/nptl/tls.h index cd135d5..58d6ab0 100644 --- a/sysdeps/csky/nptl/tls.h +++ b/sysdeps/csky/nptl/tls.h @@ -118,7 +118,7 @@ typedef struct # define THREAD_GSCOPE_RESET_FLAG() \ do \ { int __res \ - = atomic_exchange_rel (&THREAD_SELF->header.gscope_flag, \ + = atomic_exchange_release (&THREAD_SELF->header.gscope_flag, \ THREAD_GSCOPE_FLAG_UNUSED); \ if (__res == THREAD_GSCOPE_FLAG_WAIT) \ lll_futex_wake (&THREAD_SELF->header.gscope_flag, 1, LLL_PRIVATE); \ diff --git a/sysdeps/hppa/nptl/pthread_spin_init.c b/sysdeps/hppa/nptl/pthread_spin_init.c index aca5e01..f2a2009 100644 --- a/sysdeps/hppa/nptl/pthread_spin_init.c +++ b/sysdeps/hppa/nptl/pthread_spin_init.c @@ -23,7 +23,7 @@ __pthread_spin_init (pthread_spinlock_t *lock, int pshared) { /* CONCURRENCTY NOTES: - The atomic_exchange_rel synchronizes-with the atomic_exhange_acq in + The atomic_exchange_release synchronizes-with the atomic_exhange_acq in pthread_spin_lock. On hppa we must not use a plain `stw` to reset the guard lock. This @@ -40,7 +40,7 @@ __pthread_spin_init (pthread_spinlock_t *lock, int pshared) Therefore if a variable is used in an atomic macro it must always be manipulated with atomic macros in order for memory ordering rules to be preserved. */ - atomic_exchange_rel (lock, 0); + atomic_exchange_release (lock, 0); return 0; } versioned_symbol (libc, __pthread_spin_init, pthread_spin_init, diff --git a/sysdeps/hppa/nptl/pthread_spin_unlock.c b/sysdeps/hppa/nptl/pthread_spin_unlock.c index 5639ec8..885ce2b 100644 --- a/sysdeps/hppa/nptl/pthread_spin_unlock.c +++ b/sysdeps/hppa/nptl/pthread_spin_unlock.c @@ -23,7 +23,7 @@ __pthread_spin_unlock (pthread_spinlock_t *lock) { /* CONCURRENCTY NOTES: - The atomic_exchange_rel synchronizes-with the atomic_exhange_acq in + The atomic_exchange_release synchronizes-with the atomic_exhange_acq in pthread_spin_lock. On hppa we must not use a plain `stw` to reset the guard lock. This @@ -40,7 +40,7 @@ __pthread_spin_unlock (pthread_spinlock_t *lock) Therefore if a variable is used in an atomic macro it must always be manipulated with atomic macros in order for memory ordering rules to be preserved. */ - atomic_exchange_rel (lock, 0); + atomic_exchange_release (lock, 0); return 0; } versioned_symbol (libc, __pthread_spin_unlock, pthread_spin_unlock, diff --git a/sysdeps/hppa/nptl/tls.h b/sysdeps/hppa/nptl/tls.h index 204960d..e6b0bd5 100644 --- a/sysdeps/hppa/nptl/tls.h +++ b/sysdeps/hppa/nptl/tls.h @@ -123,7 +123,7 @@ static inline void __set_cr27(struct pthread *cr27) #define THREAD_GSCOPE_RESET_FLAG() \ do \ { int __res \ - = atomic_exchange_rel (&THREAD_SELF->header.gscope_flag, \ + = atomic_exchange_release (&THREAD_SELF->header.gscope_flag, \ THREAD_GSCOPE_FLAG_UNUSED); \ if (__res == THREAD_GSCOPE_FLAG_WAIT) \ lll_futex_wake (&THREAD_SELF->header.gscope_flag, 1, LLL_PRIVATE); \ diff --git a/sysdeps/ia64/nptl/tls.h b/sysdeps/ia64/nptl/tls.h index 8ccedb7..d2411b3 100644 --- a/sysdeps/ia64/nptl/tls.h +++ b/sysdeps/ia64/nptl/tls.h @@ -147,7 +147,7 @@ register struct pthread *__thread_self __asm__("r13"); #define THREAD_GSCOPE_RESET_FLAG() \ do \ { int __res \ - = atomic_exchange_rel (&THREAD_SELF->header.gscope_flag, \ + = atomic_exchange_release (&THREAD_SELF->header.gscope_flag, \ THREAD_GSCOPE_FLAG_UNUSED); \ if (__res == THREAD_GSCOPE_FLAG_WAIT) \ lll_futex_wake (&THREAD_SELF->header.gscope_flag, 1, LLL_PRIVATE); \ diff --git a/sysdeps/loongarch/nptl/tls.h b/sysdeps/loongarch/nptl/tls.h index 3b271c4..24bffe3 100644 --- a/sysdeps/loongarch/nptl/tls.h +++ b/sysdeps/loongarch/nptl/tls.h @@ -119,8 +119,8 @@ typedef struct #define THREAD_GSCOPE_RESET_FLAG() \ do \ { \ - int __res = atomic_exchange_rel (&THREAD_SELF->header.gscope_flag, \ - THREAD_GSCOPE_FLAG_UNUSED); \ + int __res = atomic_exchange_release (&THREAD_SELF->header.gscope_flag, \ + THREAD_GSCOPE_FLAG_UNUSED); \ if (__res == THREAD_GSCOPE_FLAG_WAIT) \ lll_futex_wake (&THREAD_SELF->header.gscope_flag, 1, LLL_PRIVATE); \ } \ diff --git a/sysdeps/m68k/nptl/tls.h b/sysdeps/m68k/nptl/tls.h index 30d58e3..742e1b6 100644 --- a/sysdeps/m68k/nptl/tls.h +++ b/sysdeps/m68k/nptl/tls.h @@ -122,7 +122,7 @@ extern void * __m68k_read_tp (void); #define THREAD_GSCOPE_RESET_FLAG() \ do \ { int __res \ - = atomic_exchange_rel (&THREAD_SELF->header.gscope_flag, \ + = atomic_exchange_release (&THREAD_SELF->header.gscope_flag, \ THREAD_GSCOPE_FLAG_UNUSED); \ if (__res == THREAD_GSCOPE_FLAG_WAIT) \ lll_futex_wake (&THREAD_SELF->header.gscope_flag, 1, LLL_PRIVATE); \ diff --git a/sysdeps/microblaze/nptl/tls.h b/sysdeps/microblaze/nptl/tls.h index 40a6acd..588fd1c 100644 --- a/sysdeps/microblaze/nptl/tls.h +++ b/sysdeps/microblaze/nptl/tls.h @@ -100,7 +100,7 @@ typedef struct # define THREAD_GSCOPE_RESET_FLAG() \ do \ { int __res \ - = atomic_exchange_rel (&THREAD_SELF->header.gscope_flag, \ + = atomic_exchange_release (&THREAD_SELF->header.gscope_flag, \ THREAD_GSCOPE_FLAG_UNUSED); \ if (__res == THREAD_GSCOPE_FLAG_WAIT) \ lll_futex_wake (&THREAD_SELF->header.gscope_flag, 1, LLL_PRIVATE); \ diff --git a/sysdeps/mips/nptl/tls.h b/sysdeps/mips/nptl/tls.h index 03a5b24..2aa7cb4 100644 --- a/sysdeps/mips/nptl/tls.h +++ b/sysdeps/mips/nptl/tls.h @@ -150,7 +150,7 @@ typedef struct #define THREAD_GSCOPE_RESET_FLAG() \ do \ { int __res \ - = atomic_exchange_rel (&THREAD_SELF->header.gscope_flag, \ + = atomic_exchange_release (&THREAD_SELF->header.gscope_flag, \ THREAD_GSCOPE_FLAG_UNUSED); \ if (__res == THREAD_GSCOPE_FLAG_WAIT) \ lll_futex_wake (&THREAD_SELF->header.gscope_flag, 1, LLL_PRIVATE); \ diff --git a/sysdeps/nios2/nptl/tls.h b/sysdeps/nios2/nptl/tls.h index 1808027..cb231e2 100644 --- a/sysdeps/nios2/nptl/tls.h +++ b/sysdeps/nios2/nptl/tls.h @@ -130,7 +130,7 @@ register struct pthread *__thread_self __asm__("r23"); #define THREAD_GSCOPE_RESET_FLAG() \ do \ { int __res \ - = atomic_exchange_rel (&THREAD_SELF->header.gscope_flag, \ + = atomic_exchange_release (&THREAD_SELF->header.gscope_flag, \ THREAD_GSCOPE_FLAG_UNUSED); \ if (__res == THREAD_GSCOPE_FLAG_WAIT) \ lll_futex_wake (&THREAD_SELF->header.gscope_flag, 1, LLL_PRIVATE); \ diff --git a/sysdeps/nptl/futex-internal.h b/sysdeps/nptl/futex-internal.h index cf54c27..f64728b 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 b429d9a..29aa9ad 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) \ diff --git a/sysdeps/or1k/nptl/tls.h b/sysdeps/or1k/nptl/tls.h index c6ffe62..e82f444 100644 --- a/sysdeps/or1k/nptl/tls.h +++ b/sysdeps/or1k/nptl/tls.h @@ -164,7 +164,7 @@ register tcbhead_t *__thread_self __asm__("r10"); #define THREAD_GSCOPE_RESET_FLAG() \ do \ { \ - int __res = atomic_exchange_rel (&THREAD_SELF->header.gscope_flag,\ + int __res = atomic_exchange_release (&THREAD_SELF->header.gscope_flag,\ THREAD_GSCOPE_FLAG_UNUSED); \ if (__res == THREAD_GSCOPE_FLAG_WAIT) \ lll_futex_wake (&THREAD_SELF->header.gscope_flag, 1, \ diff --git a/sysdeps/posix/libc_fatal.c b/sysdeps/posix/libc_fatal.c index 2702384..e8e582e 100644 --- a/sysdeps/posix/libc_fatal.c +++ b/sysdeps/posix/libc_fatal.c @@ -137,8 +137,8 @@ __libc_message (const char *fmt, ...) /* We have to free the old buffer since the application might catch the SIGABRT signal. */ - struct abort_msg_s *old = atomic_exchange_acq (&__abort_msg, - buf); + struct abort_msg_s *old = atomic_exchange_acquire (&__abort_msg, + buf); if (old != NULL) __munmap (old, old->size); } diff --git a/sysdeps/powerpc/nptl/tls.h b/sysdeps/powerpc/nptl/tls.h index 22b0075..e62a962 100644 --- a/sysdeps/powerpc/nptl/tls.h +++ b/sysdeps/powerpc/nptl/tls.h @@ -214,7 +214,7 @@ typedef struct #define THREAD_GSCOPE_RESET_FLAG() \ do \ { int __res \ - = atomic_exchange_rel (&THREAD_SELF->header.gscope_flag, \ + = atomic_exchange_release (&THREAD_SELF->header.gscope_flag, \ THREAD_GSCOPE_FLAG_UNUSED); \ if (__res == THREAD_GSCOPE_FLAG_WAIT) \ lll_futex_wake (&THREAD_SELF->header.gscope_flag, 1, LLL_PRIVATE); \ diff --git a/sysdeps/riscv/nptl/tls.h b/sysdeps/riscv/nptl/tls.h index 4e586f3..700c2f5 100644 --- a/sysdeps/riscv/nptl/tls.h +++ b/sysdeps/riscv/nptl/tls.h @@ -113,7 +113,7 @@ typedef struct # define THREAD_GSCOPE_RESET_FLAG() \ do \ { int __res \ - = atomic_exchange_rel (&THREAD_SELF->header.gscope_flag, \ + = atomic_exchange_release (&THREAD_SELF->header.gscope_flag, \ THREAD_GSCOPE_FLAG_UNUSED); \ if (__res == THREAD_GSCOPE_FLAG_WAIT) \ lll_futex_wake (&THREAD_SELF->header.gscope_flag, 1, LLL_PRIVATE); \ diff --git a/sysdeps/s390/nptl/tls.h b/sysdeps/s390/nptl/tls.h index ff210ff..98d7870 100644 --- a/sysdeps/s390/nptl/tls.h +++ b/sysdeps/s390/nptl/tls.h @@ -157,7 +157,7 @@ typedef struct #define THREAD_GSCOPE_RESET_FLAG() \ do \ { int __res \ - = atomic_exchange_rel (&THREAD_SELF->header.gscope_flag, \ + = atomic_exchange_release (&THREAD_SELF->header.gscope_flag, \ THREAD_GSCOPE_FLAG_UNUSED); \ if (__res == THREAD_GSCOPE_FLAG_WAIT) \ lll_futex_wake (&THREAD_SELF->header.gscope_flag, 1, LLL_PRIVATE); \ diff --git a/sysdeps/sh/nptl/tls.h b/sysdeps/sh/nptl/tls.h index 76591ab..1530489 100644 --- a/sysdeps/sh/nptl/tls.h +++ b/sysdeps/sh/nptl/tls.h @@ -129,7 +129,7 @@ typedef struct #define THREAD_GSCOPE_RESET_FLAG() \ do \ { int __res \ - = atomic_exchange_rel (&THREAD_SELF->header.gscope_flag, \ + = atomic_exchange_release (&THREAD_SELF->header.gscope_flag, \ THREAD_GSCOPE_FLAG_UNUSED); \ if (__res == THREAD_GSCOPE_FLAG_WAIT) \ lll_futex_wake (&THREAD_SELF->header.gscope_flag, 1, LLL_PRIVATE); \ diff --git a/sysdeps/sparc/nptl/tls.h b/sysdeps/sparc/nptl/tls.h index d1e2bb4..95a69cb 100644 --- a/sysdeps/sparc/nptl/tls.h +++ b/sysdeps/sparc/nptl/tls.h @@ -130,7 +130,7 @@ register struct pthread *__thread_self __asm__("%g7"); #define THREAD_GSCOPE_RESET_FLAG() \ do \ { int __res \ - = atomic_exchange_rel (&THREAD_SELF->header.gscope_flag, \ + = atomic_exchange_release (&THREAD_SELF->header.gscope_flag, \ THREAD_GSCOPE_FLAG_UNUSED); \ if (__res == THREAD_GSCOPE_FLAG_WAIT) \ lll_futex_wake (&THREAD_SELF->header.gscope_flag, 1, LLL_PRIVATE); \ |