summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2019-01-16 09:04:02 -0700
committerJens Axboe <axboe@kernel.dk>2019-01-16 09:04:02 -0700
commit61102796612a867d85ee4b3c5a660e1f4b1c2766 (patch)
tree2fc38a5f1ca7303e7e48972b2758ee95e19a45bb /src
parentb93edf5b9eb6f392d40585e26df1663fccc0c09d (diff)
downloadliburing-61102796612a867d85ee4b3c5a660e1f4b1c2766.tar.gz
liburing-61102796612a867d85ee4b3c5a660e1f4b1c2766.tar.bz2
Update barriers for x86/x86-64
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'src')
-rw-r--r--src/barrier.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/barrier.h b/src/barrier.h
index 2076c1c..ef00f67 100644
--- a/src/barrier.h
+++ b/src/barrier.h
@@ -1,12 +1,9 @@
#ifndef LIBURING_BARRIER_H
#define LIBURING_BARRIER_H
-#if defined(__x86_64)
-#define read_barrier() __asm__ __volatile__("lfence":::"memory")
-#define write_barrier() __asm__ __volatile__("sfence":::"memory")
-#elif defined(__i386__)
-#define read_barrier() __asm__ __volatile__("": : :"memory")
-#define write_barrier() __asm__ __volatile__("": : :"memory")
+#if defined(__x86_64) || defined(__i386__)
+#define read_barrier() __asm__ __volatile__("":::"memory")
+#define write_barrier() __asm__ __volatile__("":::"memory")
#else
/*
* Add arch appropriate definitions. Be safe and use full barriers for