]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
* sysdep/alpha/locks.h (read_barrier): New.
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 9 Feb 2007 20:40:56 +0000 (20:40 +0000)
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 9 Feb 2007 20:40:56 +0000 (20:40 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@121774 138bc75d-0d04-0410-961f-82ee72b054a4

libjava/ChangeLog
libjava/sysdep/alpha/locks.h

index 7f38c88ada7984652bf6cfaa5d13d834f4ccdc1d..49b0567e673fb2a900f0e3b3488bed99f43ade4b 100644 (file)
@@ -1,3 +1,7 @@
+2007-02-09  Richard Henderson  <rth@redhat.com>
+
+       * sysdep/alpha/locks.h (read_barrier): New.
+
 2007-02-09  Keith Seitz  <keiths@redhat.com>
 
        * gnu/classpath/jdwp/VMVirtualMachine.java
index c5f7f4993e6bdbe3ed1a25ba2465a8592a9cd7c2..a6b4394080bf3799a7d9fa75341f9feeb49f9256 100644 (file)
@@ -50,6 +50,14 @@ compare_and_swap_release(volatile obj_addr_t *addr,
   return compare_and_swap(addr, old, new_val);
 }
 
+// Ensure that subsequent instructions do not execute on stale
+// data that was loaded from memory before the barrier.
+inline static void
+read_barrier()
+{
+  __asm__ __volatile__("mb" : : : "memory");
+}
+
 // Ensure that prior stores to memory are completed with respect to other
 // processors.
 inline static void