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 <richard.yao@alumni.stonybrook.edu>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Mateusz Guzik <mjguzik@gmail.com>
Closes #13907
This commit is contained in:
Mateusz Guzik
2022-09-21 00:32:44 +02:00
committed by GitHub
parent 62e2a2881f
commit 402426c7d8
4 changed files with 15 additions and 0 deletions
+7
View File
@@ -313,6 +313,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