aboutsummaryrefslogtreecommitdiff
path: root/sys/amd64/include/atomic.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/amd64/include/atomic.h')
-rw-r--r--sys/amd64/include/atomic.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/amd64/include/atomic.h b/sys/amd64/include/atomic.h
index 0edbfff52ff7..d2a3846172d9 100644
--- a/sys/amd64/include/atomic.h
+++ b/sys/amd64/include/atomic.h
@@ -32,6 +32,10 @@
#error this file needs sys/cdefs.h as a prerequisite
#endif
+#define mb() __asm__ __volatile__ ("mfence;": : :"memory")
+#define wmb() __asm__ __volatile__ ("sfence;": : :"memory")
+#define rmb() __asm__ __volatile__ ("lfence;": : :"memory")
+
/*
* Various simple operations on memory, each of which is atomic in the
* presence of interrupts and multiple processors.