aboutsummaryrefslogtreecommitdiff
path: root/sysdeps
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/ia64/bits/atomic.h23
-rw-r--r--sysdeps/unix/clock_gettime.c4
2 files changed, 10 insertions, 17 deletions
diff --git a/sysdeps/ia64/bits/atomic.h b/sysdeps/ia64/bits/atomic.h
index e7d312c539..1020c2f229 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) \
diff --git a/sysdeps/unix/clock_gettime.c b/sysdeps/unix/clock_gettime.c
index b7b0428e0b..c8cef55fac 100644
--- a/sysdeps/unix/clock_gettime.c
+++ b/sysdeps/unix/clock_gettime.c
@@ -1,5 +1,5 @@
/* clock_gettime -- Get the current time from a POSIX clockid_t. Unix version.
- Copyright (C) 1999,2000,2001,2002,2003,2004 Free Software Foundation, Inc.
+ Copyright (C) 1999-2004, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -100,7 +100,7 @@ clock_gettime (clockid_t clock_id, struct timespec *tp)
SYSDEP_GETTIME;
#endif
-#ifndef HANDLED_REALTIME
+#ifdef HANDLED_REALTIME
case CLOCK_REALTIME:
HANDLE_REALTIME;
break;