aboutsummaryrefslogtreecommitdiff
path: root/sys/amd64/include/atomic.h
diff options
context:
space:
mode:
authorKip Macy <kmacy@FreeBSD.org>2008-11-22 05:55:56 +0000
committerKip Macy <kmacy@FreeBSD.org>2008-11-22 05:55:56 +0000
commitdb7f0b974f2ab273540a458ab50929ccbb1aa581 (patch)
tree0291af1a0fda6ca2d8e62cb1f363d45baefe0303 /sys/amd64/include/atomic.h
parent2a1b9f07fc64f33b96e7077bedaafc167afc2625 (diff)
downloadsrc-db7f0b974f2ab273540a458ab50929ccbb1aa581.tar.gz
src-db7f0b974f2ab273540a458ab50929ccbb1aa581.zip
Notes
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.