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

[PATCH] PPC lll_mutex_unlock_force write barrier



For Power4 and future processors with long store queues and out of order
execution, lll_mutex_unlock_force needs a write barrier between the store and
the futex syscall.

2003-08-26  Steven Munroe <sjmunroe us ibm com>

	* sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [lll_mutex_unlock_force]:
	Add memory barrier between store and futex syscall.


-- 
Steven Munroe
sjmunroe us ibm com
Linux on PowerPC-64 Development
GLIBC for PowerPC-64 Development
diff -urN libc23-ppc64nptl-20030825/nptl/sysdeps/unix/sysv/linux/powerpc/lowlevellock.h libc23/nptl/sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
--- libc23-ppc64nptl-20030825/nptl/sysdeps/unix/sysv/linux/powerpc/lowlevellock.h	2003-06-19 14:39:28.000000000 -0500
+++ libc23/nptl/sysdeps/unix/sysv/linux/powerpc/lowlevellock.h	2003-08-11 11:15:32.000000000 -0500
@@ -148,6 +148,7 @@
   ((void) ({								      \
     int *__futex = &(lock);						      \
     *__futex = 0;							      \
+    __asm __volatile (__lll_rel_instr ::: "memory");			      \
     lll_futex_wake (__futex, 1);					      \
   }))
 

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