locks.h (read_barrier): New.
* sysdep/sh/locks.h (read_barrier): New. (write_barrier): Likewise. From-SVN: r120735
This commit is contained in:
parent
db9d500a22
commit
228e6ac245
2 changed files with 18 additions and 1 deletions
|
@ -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__ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue