aboutsummaryrefslogtreecommitdiff
path: root/port/atomic_pointer.h
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2013-12-12 22:08:18 +0100
committerPieter Wuille <pieter.wuille@gmail.com>2013-12-12 22:08:18 +0100
commit55c68902946c8c9bacea748c159be456a7c9c180 (patch)
treebbd4bca2cf64d9b32f6831e68156a1af0dea2311 /port/atomic_pointer.h
parenteed29f0f50806b9cfe9653509e7ed7f7eebdd3e3 (diff)
Squashed 'src/leveldb/' changes from 936b461..e991315
e991315 Merge upstream LevelDB 1.15. 0cfb990 Release LevelDB 1.15 02ac9f1 Merge upstream LevelDB 1.14. 0b9a89f Release LevelDB 1.14 git-subtree-dir: src/leveldb git-subtree-split: e991315d7fe4ca84a98902578106cbffa3dcccfd
Diffstat (limited to 'port/atomic_pointer.h')
-rw-r--r--port/atomic_pointer.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/port/atomic_pointer.h b/port/atomic_pointer.h
index e17bf435ea..a9866b2302 100644
--- a/port/atomic_pointer.h
+++ b/port/atomic_pointer.h
@@ -50,6 +50,13 @@ namespace port {
// http://msdn.microsoft.com/en-us/library/ms684208(v=vs.85).aspx
#define LEVELDB_HAVE_MEMORY_BARRIER
+// Mac OS
+#elif defined(OS_MACOSX)
+inline void MemoryBarrier() {
+ OSMemoryBarrier();
+}
+#define LEVELDB_HAVE_MEMORY_BARRIER
+
// Gcc on x86
#elif defined(ARCH_CPU_X86_FAMILY) && defined(__GNUC__)
inline void MemoryBarrier() {
@@ -68,13 +75,6 @@ inline void MemoryBarrier() {
}
#define LEVELDB_HAVE_MEMORY_BARRIER
-// Mac OS
-#elif defined(OS_MACOSX)
-inline void MemoryBarrier() {
- OSMemoryBarrier();
-}
-#define LEVELDB_HAVE_MEMORY_BARRIER
-
// ARM Linux
#elif defined(ARCH_CPU_ARM_FAMILY) && defined(__linux__)
typedef void (*LinuxKernelMemoryBarrierFunc)(void);