diff options
author | Kaz Kojima <kkojima@gcc.gnu.org> | 2007-01-12 22:27:49 +0000 |
---|---|---|
committer | Kaz Kojima <kkojima@gcc.gnu.org> | 2007-01-12 22:27:49 +0000 |
commit | 228e6ac24512fc77d715b6c59eae96fdfbcc5fa6 (patch) | |
tree | c2f9487eca7bc2fce84c29f6f777b6bfd698cf36 | |
parent | db9d500a22dedb8574dab86475a27d06a3059adf (diff) | |
download | gcc-228e6ac24512fc77d715b6c59eae96fdfbcc5fa6.zip gcc-228e6ac24512fc77d715b6c59eae96fdfbcc5fa6.tar.gz gcc-228e6ac24512fc77d715b6c59eae96fdfbcc5fa6.tar.bz2 |
locks.h (read_barrier): New.
* sysdep/sh/locks.h (read_barrier): New.
(write_barrier): Likewise.
From-SVN: r120735
-rw-r--r-- | libjava/ChangeLog | 5 | ||||
-rw-r--r-- | libjava/sysdep/sh/locks.h | 14 |
2 files changed, 18 insertions, 1 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 1269fc8..70a1583 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -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. diff --git a/libjava/sysdep/sh/locks.h b/libjava/sysdep/sh/locks.h index f6076d6..9a152fb 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__ */ |