[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Fwd: [PATCH] lll_mutex_unlock must use atomic_exchange_rel]



Looks like the first version of this note got lost. Resending.
--- Begin Message --- It seems atomic_exchange is no longer defined and implementations should use atomic_exchange_acq or atomic_exchange_rel.

2003-05-12 Steven Munroe <sjmunroe us ibm com>

	* sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
	(lll_mutex_unlock): Use atomic_exchange_rel.
diff -urN nptl-0.38/nptl/sysdeps/unix/sysv/linux/powerpc/lowlevellock.h libc23/nptl/sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
--- nptl-0.38/nptl/sysdeps/unix/sysv/linux/powerpc/lowlevellock.h	2003-03-20 03:59:48.000000000 -0600
+++ libc23/nptl/sysdeps/unix/sysv/linux/powerpc/lowlevellock.h	2003-05-12 11:11:17.000000000 -0500
@@ -115,7 +115,7 @@
 #define lll_mutex_unlock(lock) \
   ((void) ({								      \
     int *__futex = &(lock);						      \
-    int __val = atomic_exchange (__futex, 0);				      \
+    int __val = atomic_exchange_rel (__futex, 0);				      \
     if (__builtin_expect (__val > 1, 0))				      \
       lll_futex_wake (__futex, 1);					      \
   }))

--- End Message ---

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]