aboutsummaryrefslogtreecommitdiffstats
path: root/lib/libspl/include
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 /lib/libspl/include
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 'lib/libspl/include')
-rw-r--r--lib/libspl/include/atomic.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/libspl/include/atomic.h b/lib/libspl/include/atomic.h
index 1249d42b6..4ebdbbda9 100644
--- a/lib/libspl/include/atomic.h
+++ b/lib/libspl/include/atomic.h
@@ -314,6 +314,13 @@ extern void membar_enter(void);
extern void membar_exit(void);
/*
+ * Make all stores and loads emitted prior to the the barrier complete before
+ * crossing it, while also making sure stores and loads emitted after the
+ * barrier only start being executed after crossing it.
+ */
+extern void membar_sync(void);
+
+/*
* Arrange that all stores issued before this point in the code reach
* global visibility before any stores that follow; useful in producer
* modules that update a data item, then set a flag that it is available.