summaryrefslogtreecommitdiff
path: root/libjava/sysdep
diff options
context:
space:
mode:
authorkkojima <kkojima@138bc75d-0d04-0410-961f-82ee72b054a4>2007-01-12 22:27:49 +0000
committerkkojima <kkojima@138bc75d-0d04-0410-961f-82ee72b054a4>2007-01-12 22:27:49 +0000
commit3bdb462352925c06416e5447f959ede6dba60d7c (patch)
treec2f9487eca7bc2fce84c29f6f777b6bfd698cf36 /libjava/sysdep
parenta20cec609aad5556cebc3a7c8fb7bbd1dfbdc894 (diff)
downloadgcc-3bdb462352925c06416e5447f959ede6dba60d7c.tar.gz
* sysdep/sh/locks.h (read_barrier): New.
(write_barrier): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@120735 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/sysdep')
-rw-r--r--libjava/sysdep/sh/locks.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/libjava/sysdep/sh/locks.h b/libjava/sysdep/sh/locks.h
index f6076d60199..9a152fb30e5 100644
--- a/libjava/sysdep/sh/locks.h
+++ b/libjava/sysdep/sh/locks.h
@@ -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__ */