mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-22 19:00:07 +00:00
Update.
2003-03-20 Ulrich Drepper <drepper@redhat.com> * include/atomic.h: Define atomic_compare_and_exchange_val_acq, atomic_compare_and_exchange_val_rel, atomic_compare_and_exchange_bool_acq, and atomic_compare_and_exchange_bool_rel instead of atomic_compare_and_exchange_acq and atomic_compare_and_exchange_rel. * sysdeps/i386/i486/bits/atomic.h: Define __arch_compare_and_exchange_val_*_acq instead of __arch_compare_and_exchange_*_acq. * sysdeps/x86_64/bits/atomic.h: Likewise. * sysdeps/ia64/bits/atomic.h: Define __arch_compare_and_exchange_bool_*_acq instead of __arch_compare_and_exchange_*_acq. * sysdeps/powerpc/bits/atomic.h: Likewise. * sysdeps/s390/bits/atomic.h: Likewise. * gmon/mcount.c: Adjust for new form of compare&exchange macros. * malloc/set-freeres.c: Likewise. * nscd/cache.c: Likewise. * stdlib/cxa_finalize.c: Likewise. * sysdeps/unix/sysv/linux/getsysstats.c: Likewise.
This commit is contained in:
parent
5a3ab2fc18
commit
9f07eae298
22
ChangeLog
22
ChangeLog
@ -1,3 +1,25 @@
|
||||
2003-03-20 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
* include/atomic.h: Define atomic_compare_and_exchange_val_acq,
|
||||
atomic_compare_and_exchange_val_rel,
|
||||
atomic_compare_and_exchange_bool_acq, and
|
||||
atomic_compare_and_exchange_bool_rel instead of
|
||||
atomic_compare_and_exchange_acq and atomic_compare_and_exchange_rel.
|
||||
* sysdeps/i386/i486/bits/atomic.h: Define
|
||||
__arch_compare_and_exchange_val_*_acq instead of
|
||||
__arch_compare_and_exchange_*_acq.
|
||||
* sysdeps/x86_64/bits/atomic.h: Likewise.
|
||||
* sysdeps/ia64/bits/atomic.h: Define
|
||||
__arch_compare_and_exchange_bool_*_acq instead of
|
||||
__arch_compare_and_exchange_*_acq.
|
||||
* sysdeps/powerpc/bits/atomic.h: Likewise.
|
||||
* sysdeps/s390/bits/atomic.h: Likewise.
|
||||
* gmon/mcount.c: Adjust for new form of compare&exchange macros.
|
||||
* malloc/set-freeres.c: Likewise.
|
||||
* nscd/cache.c: Likewise.
|
||||
* stdlib/cxa_finalize.c: Likewise.
|
||||
* sysdeps/unix/sysv/linux/getsysstats.c: Likewise.
|
||||
|
||||
2003-03-20 Alexandre Oliva <aoliva@redhat.com>
|
||||
|
||||
* sysdeps/mips/bits/setjmp.h: n32 has only 6 call-saved fpregs.
|
||||
|
@ -1,5 +1,12 @@
|
||||
2003-03-21 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
* sysdeps/unix/sysv/linux/ia64/lowlevellock.h
|
||||
(__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
|
||||
instead of __lll_compare_and_swap.
|
||||
* sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
|
||||
Likewise.
|
||||
Removed definition if __lll_compare_and_swap.
|
||||
|
||||
* cancellation.c: Adjust for new form of compare&exchange macros.
|
||||
* cleanup_defer.c: Likewise.
|
||||
* init.c: Likewise.
|
||||
|
@ -87,14 +87,11 @@
|
||||
__r10 == -1 ? -__r8 : __r8; \
|
||||
})
|
||||
|
||||
#define __lll_compare_and_swap(futex, oldval, newval) \
|
||||
__sync_val_compare_and_swap_si ((futex), (oldval), (newval))
|
||||
|
||||
static inline int
|
||||
__attribute__ ((always_inline))
|
||||
__lll_mutex_trylock (int *futex)
|
||||
{
|
||||
return __lll_compare_and_swap (futex, 0, 1) != 0;
|
||||
return atomic_compare_and_exchange_val_acq (futex, 1, 0) != 0;
|
||||
}
|
||||
#define lll_mutex_trylock(futex) __lll_mutex_trylock (&(futex))
|
||||
|
||||
|
@ -52,7 +52,8 @@ __pthread_once (once_control, init_routine)
|
||||
|
||||
oldval = val;
|
||||
newval = (oldval & 3) | __fork_generation | 1;
|
||||
val = __lll_compare_and_swap (once_control, oldval, newval);
|
||||
val = atomic_compare_and_exchange_val_acq (once_control, newval,
|
||||
oldval);
|
||||
}
|
||||
while (__builtin_expect (val != oldval, 0));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user