riscv64: implement memory barriers
Change-Id: Ied9e6dad38968cee6e828dff6ec413e6281086cd Reviewed-on: https://review.haiku-os.org/c/haiku/+/6436 Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This commit is contained in:
parent
88306be95c
commit
6550124ea0
@ -12,23 +12,21 @@
|
|||||||
static inline void
|
static inline void
|
||||||
memory_read_barrier_inline(void)
|
memory_read_barrier_inline(void)
|
||||||
{
|
{
|
||||||
// TODO: investigate reparate read/write barriers
|
asm volatile("fence ir, ir" : : : "memory");
|
||||||
__sync_synchronize();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
memory_write_barrier_inline(void)
|
memory_write_barrier_inline(void)
|
||||||
{
|
{
|
||||||
// TODO: investigate reparate read/write barriers
|
asm volatile("fence ow, ow" : : : "memory");
|
||||||
__sync_synchronize();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
memory_full_barrier_inline(void)
|
memory_full_barrier_inline(void)
|
||||||
{
|
{
|
||||||
__sync_synchronize();
|
asm volatile("fence iorw, iorw" : : : "memory");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user