about summary refs log tree commit diff
path: root/nptl/sysdeps/unix
diff options
context:
space:
mode:
Diffstat (limited to 'nptl/sysdeps/unix')
-rw-r--r--nptl/sysdeps/unix/sysv/linux/ia64/lowlevellock.h5
-rw-r--r--nptl/sysdeps/unix/sysv/linux/ia64/pthread_once.c3
2 files changed, 3 insertions, 5 deletions
diff --git a/nptl/sysdeps/unix/sysv/linux/ia64/lowlevellock.h b/nptl/sysdeps/unix/sysv/linux/ia64/lowlevellock.h
index 6f999221c5..8fa96ed6a2 100644
--- a/nptl/sysdeps/unix/sysv/linux/ia64/lowlevellock.h
+++ b/nptl/sysdeps/unix/sysv/linux/ia64/lowlevellock.h
@@ -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))
 
diff --git a/nptl/sysdeps/unix/sysv/linux/ia64/pthread_once.c b/nptl/sysdeps/unix/sysv/linux/ia64/pthread_once.c
index c9e6be16b8..16f1279f8d 100644
--- a/nptl/sysdeps/unix/sysv/linux/ia64/pthread_once.c
+++ b/nptl/sysdeps/unix/sysv/linux/ia64/pthread_once.c
@@ -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));