1 // Memory and I/O barriers. These are not privileged.
3 #ifndef _LL_ARCH_X86C_BARRIERS_FENCE_H
4 #define _LL_ARCH_X86C_BARRIERS_FENCE_H
6 #include <lowlevel/types.h>
8 static inline void ll_membar()
10 asm volatile("mfence" : : : "memory");
13 static inline void ll_membar_load_after_load()
15 asm volatile("lfence" : : : "memory");
18 static inline void ll_membar_load_after_store()
23 static inline void ll_membar_load_after_any()
28 static inline void ll_membar_any_after_load()
33 static inline void ll_membar_store_after_load()
38 static inline void ll_membar_store_after_store()
40 asm volatile("sfence" : : : "memory");
43 static inline void ll_membar_store_after_any()
48 static inline void ll_membar_any_after_store()
53 static inline void ll_smp_membar()
61 static inline void ll_smp_membar_load_after_load()
64 ll_membar_load_after_load();
69 static inline void ll_smp_membar_load_after_store()
74 static inline void ll_smp_membar_load_after_any()
79 static inline void ll_smp_membar_any_after_load()
84 static inline void ll_smp_membar_store_after_load()
89 static inline void ll_smp_membar_store_after_store()
92 ll_membar_store_after_store();
97 static inline void ll_smp_membar_store_after_any()
102 static inline void ll_smp_membar_any_after_store()