diff options
Diffstat (limited to 'sys/sparc64/include/atomic.h')
-rw-r--r-- | sys/sparc64/include/atomic.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/sys/sparc64/include/atomic.h b/sys/sparc64/include/atomic.h index 0ceced8..789ed24 100644 --- a/sys/sparc64/include/atomic.h +++ b/sys/sparc64/include/atomic.h @@ -279,6 +279,35 @@ atomic_store_rel_ ## name(volatile ptype p, vtype v) \ atomic_st_rel((p), (v), sz); \ } +static __inline void +atomic_thread_fence_acq(void) +{ + + __compiler_membar(); +} + +static __inline void +atomic_thread_fence_rel(void) +{ + + __compiler_membar(); +} + +static __inline void +atomic_thread_fence_acq_rel(void) +{ + + __compiler_membar(); +} + +static __inline void +atomic_thread_fence_seq_cst(void) +{ + + membar(LoadLoad | LoadStore | StoreStore | StoreLoad); +} + + ATOMIC_GEN(int, u_int *, u_int, u_int, 32); ATOMIC_GEN(32, uint32_t *, uint32_t, uint32_t, 32); |