/* 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);
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;
|| 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); \
} \
#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; \
})
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 {
{
@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
@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
@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
@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
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))
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);
# 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); \
#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); \
#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); \
#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); \
# 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); \
{
/* 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
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,
{
/* 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
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,
#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); \
#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); \
#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); \
} \
#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); \
# 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); \
#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); \
#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); \
{
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,
((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)
({ \
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) \
#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, \
/* 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);
}
#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); \
# 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); \
#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); \
#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); \
#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); \