aboutsummaryrefslogtreecommitdiffstats
path: root/include/os/freebsd/spl/sys/atomic.h
diff options
context:
space:
mode:
authorMateusz Guzik <[email protected]>2022-09-21 00:32:44 +0200
committerGitHub <[email protected]>2022-09-20 15:32:44 -0700
commit402426c7d81f410fa088c3bd893d4941a97d8332 (patch)
tree30e80418cbf12bfc1df324f6100791384cb5828e /include/os/freebsd/spl/sys/atomic.h
parent62e2a2881f6b441c136fb4ccb66ab491a5e6101f (diff)
Add membar_sync
Provides the missing full barrier variant to the membar primitive set. While not used right now, this is probably going to change down the road. Name taken from Solaris, to follow the existing routines. Reviewed-by: Richard Yao <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Mateusz Guzik <[email protected]> Closes #13907
Diffstat (limited to 'include/os/freebsd/spl/sys/atomic.h')
-rw-r--r--include/os/freebsd/spl/sys/atomic.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/os/freebsd/spl/sys/atomic.h b/include/os/freebsd/spl/sys/atomic.h
index 01b13fc9a..8b9cec15c 100644
--- a/include/os/freebsd/spl/sys/atomic.h
+++ b/include/os/freebsd/spl/sys/atomic.h
@@ -59,6 +59,7 @@ extern uint64_t atomic_cas_64(volatile uint64_t *target, uint64_t cmp,
#define membar_consumer() atomic_thread_fence_acq()
#define membar_producer() atomic_thread_fence_rel()
+#define membar_sync() atomic_thread_fence_seq_cst()
static __inline uint32_t
atomic_add_32_nv(volatile uint32_t *target, int32_t delta)