05dda88dc1
Change-Id: I6bfbacb61eae84ffebc30c2565683348d684d88f Reviewed-on: https://review.haiku-os.org/c/1063 Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
42 lines
926 B
C
42 lines
926 B
C
/*
|
|
* Copyright 2014, Paweł Dziepak, pdziepak@quarnos.org.
|
|
* Distributed under the terms of the MIT License.
|
|
*
|
|
* Authors:
|
|
* François Revol <revol@free.fr>
|
|
*/
|
|
#ifndef _KERNEL_ARCH_RISCV64_ATOMIC_H
|
|
#define _KERNEL_ARCH_RISCV64_ATOMIC_H
|
|
|
|
|
|
static inline void
|
|
memory_read_barrier_inline(void)
|
|
{
|
|
asm volatile ("nop;" : : : "memory");
|
|
#warning RISCV64: check memory_read_barrier_inline (FNOP ?)
|
|
}
|
|
|
|
|
|
static inline void
|
|
memory_write_barrier_inline(void)
|
|
{
|
|
asm volatile ("nop;" : : : "memory");
|
|
#warning RISCV64: check memory_write_barrier_inline (FNOP ?)
|
|
}
|
|
|
|
|
|
static inline void
|
|
memory_full_barrier_inline(void)
|
|
{
|
|
asm volatile ("nop;" : : : "memory");
|
|
#warning RISCV64: check memory_full_barrier_inline (FNOP ?)
|
|
}
|
|
|
|
|
|
#define memory_read_barrier memory_read_barrier_inline
|
|
#define memory_write_barrier memory_write_barrier_inline
|
|
#define memory_full_barrier memory_full_barrier_inline
|
|
|
|
|
|
#endif // _KERNEL_ARCH_RISCV64_ATOMIC_H
|