[PATCH] PPC lll_mutex_unlock_force write barrier

Steven Munroe <[email protected]>
Newsgroups gmane.comp.lib.phil
Organization IBM Linux Developement
Message-ID <[email protected]>
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 <[email protected]>

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


-- 
Steven Munroe
[email protected]
Linux on PowerPC-64 Development
GLIBC for PowerPC-64 Development
ppc-nptl-lll-20030825.patch (text/plain, 607 B)
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);					      \
   }))
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.