]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
locks.h (read_barrier): New.
authorKaz Kojima <kkojima@gcc.gnu.org>
Fri, 12 Jan 2007 22:27:49 +0000 (22:27 +0000)
committerKaz Kojima <kkojima@gcc.gnu.org>
Fri, 12 Jan 2007 22:27:49 +0000 (22:27 +0000)
* sysdep/sh/locks.h (read_barrier): New.
(write_barrier): Likewise.

From-SVN: r120735

libjava/ChangeLog
libjava/sysdep/sh/locks.h

index 1269fc862f82c5018a80fb35fac9cd3454672605..70a158386f5ea37918dae8840f50fcb49ec8d158 100644 (file)
@@ -1,3 +1,8 @@
+2007-01-12  Kaz Kojima  <kkojima@gcc.gnu.org>
+
+       * sysdep/sh/locks.h (read_barrier): New.
+       (write_barrier): Likewise.
+
 2007-01-12  Andrew Haley  <aph@redhat.com>
 
        * include/i386-signal.h: Rewrite to use rt_sigaction.
index f6076d601997adf3da73499f549455dcab1b2fa2..9a152fb30e58c7159c98556ce92e637bde4479c2 100644 (file)
@@ -1,6 +1,6 @@
 // locks.h - Thread synchronization primitives. SuperH implementation.
 
-/* Copyright (C) 2002  Free Software Foundation
+/* Copyright (C) 2002, 2007  Free Software Foundation
 
    This file is part of libgcj.
 
@@ -69,4 +69,16 @@ compare_and_swap_release (volatile obj_addr_t *addr, obj_addr_t old,
   return compare_and_swap (addr, old, new_val);
 }
 
+inline static void
+read_barrier()
+{
+  __asm__ __volatile__(" " : : : "memory");
+}
+
+inline static void
+write_barrier()
+{
+  __asm__ __volatile__(" " : : : "memory");
+}
+
 #endif /* ! __SYSDEP_LOCKS_H__ */