SyterKit
0.4.0.x
SyterKit is a bare-metal framework
Loading...
Searching...
No Matches
include
arch
riscv
barrier.h
Go to the documentation of this file.
1
12
/* SPDX-License-Identifier: GPL-2.0+ */
13
14
#ifndef __RISCV_BARRIER_H__
15
#define __RISCV_BARRIER_H__
16
17
#ifdef __cplusplus
18
extern
"C"
{
19
#endif
20
42
#define RISCV_FENCE(p, s) asm volatile("fence " #p "," #s \
43
: \
44
: \
45
: "memory")
46
55
#define mb() RISCV_FENCE(iorw, iorw)
56
64
#define rmb() RISCV_FENCE(ir, ir)
65
73
#define wmb() RISCV_FENCE(ow, ow)
74
83
#define __smp_mb() RISCV_FENCE(rw, rw)
84
92
#define __smp_rmb() RISCV_FENCE(r, r)
93
101
#define __smp_wmb() RISCV_FENCE(w, w)
102
103
#ifdef __cplusplus
104
}
105
#endif
106
107
#endif
/* __RISCV_BARRIER_H__ */
Generated by
1.9.8