aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/ia64
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2005-05-21 18:40:10 +0000
committerUlrich Drepper <drepper@redhat.com>2005-05-21 18:40:10 +0000
commit363dd976272ecf5975c1996c829e614d452a8f8d (patch)
tree583056a34cffab4ce27ecdb2c64325749eabb6fc /sysdeps/ia64
parent572215377f0220adef77eefccedc731cd4fb523a (diff)
downloadglibc-363dd976272ecf5975c1996c829e614d452a8f8d.zip
glibc-363dd976272ecf5975c1996c829e614d452a8f8d.tar.gz
glibc-363dd976272ecf5975c1996c829e614d452a8f8d.tar.bz2
[BZ #955]
2005-05-19 Richard Henderson <rth@redhat.com> * sysdeps/unix/clock_gettime.c (clock_gettime): Fix typo around CLOCK_REALTIME. * sysdeps/ia64/bits/atomic.h (__arch_compare_and_exchange_bool_32_acq, __arch_compare_and_exchange_bool_64_acq, __arch_compare_and_exchange_val_32_acq, __arch_compare_and_exchange_val_64_acq, atomic_exchange_and_add): Use __sync builtin without _si or _di suffix. 2005-05-19 Jakub Jelinek <jakub@redhat.com> [BZ #955] * iconvdata/ibm939.c (BODY): Avoid segfaults with input characters <UFFFF> and above. 2005-05-17 Andreas Schwab <schwab@suse.de> * sysdeps/unix/sysv/linux/clock_getcpuclockid.c (clock_getcpuclockid): Always return a defined value.
Diffstat (limited to 'sysdeps/ia64')
-rw-r--r--sysdeps/ia64/bits/atomic.h23
1 files changed, 8 insertions, 15 deletions
diff --git a/sysdeps/ia64/bits/atomic.h b/sysdeps/ia64/bits/atomic.h
index e7d312c..1020c2f 100644
--- a/sysdeps/ia64/bits/atomic.h
+++ b/sysdeps/ia64/bits/atomic.h
@@ -52,12 +52,12 @@ typedef uintmax_t uatomic_max_t;
(abort (), 0)
#define __arch_compare_and_exchange_bool_32_acq(mem, newval, oldval) \
- (!__sync_bool_compare_and_swap_si ((void *) (mem), (int) (long) (oldval), \
- (int) (long) (newval)))
+ (!__sync_bool_compare_and_swap ((mem), (int) (long) (oldval), \
+ (int) (long) (newval)))
#define __arch_compare_and_exchange_bool_64_acq(mem, newval, oldval) \
- (!__sync_bool_compare_and_swap_di ((void *) (mem), (long) (oldval), \
- (long) (newval)))
+ (!__sync_bool_compare_and_swap ((mem), (long) (oldval), \
+ (long) (newval)))
#define __arch_compare_and_exchange_val_8_acq(mem, newval, oldval) \
(abort (), (__typeof (*mem)) 0)
@@ -66,12 +66,11 @@ typedef uintmax_t uatomic_max_t;
(abort (), (__typeof (*mem)) 0)
#define __arch_compare_and_exchange_val_32_acq(mem, newval, oldval) \
- __sync_val_compare_and_swap_si ((void *) (mem), (int) (long) (oldval), \
- (int) (long) (newval))
+ __sync_val_compare_and_swap ((mem), (int) (long) (oldval), \
+ (int) (long) (newval))
#define __arch_compare_and_exchange_val_64_acq(mem, newval, oldval) \
- __sync_val_compare_and_swap_di ((void *) (mem), (long) (oldval), \
- (long) (newval))
+ __sync_val_compare_and_swap ((mem), (long) (oldval), (long) (newval))
/* Atomically store newval and return the old value. */
#define atomic_exchange_acq(mem, value) \
@@ -80,15 +79,9 @@ typedef uintmax_t uatomic_max_t;
#define atomic_exchange_rel(mem, value) \
(__sync_synchronize (), __sync_lock_test_and_set (mem, value))
-
#define atomic_exchange_and_add(mem, value) \
({ __typeof (*mem) __result; \
- if (sizeof (*mem) == 4) \
- __result = __sync_fetch_and_add_si ((void *) (mem), (int) (value)); \
- else if (sizeof (*mem) == 8) \
- __result = __sync_fetch_and_add_di ((void *) (mem), (long) (value)); \
- else \
- abort (); \
+ __result = __sync_fetch_and_add ((mem), (int) (value)); \
__result; })
#define atomic_decrement_if_positive(mem) \