Blame leveldb-0002-Add-memory-barrier-on-a-more-arches.patch
|
|
ce9f2c4 |
From d024d7fdb808dd4d3e8ad57b83aa3441129c8276 Mon Sep 17 00:00:00 2001
|
|
|
ce9f2c4 |
From: Peter Lemenkov <lemenkov@gmail.com>
|
|
|
ce9f2c4 |
Date: Sat, 19 May 2012 11:33:43 +0400
|
|
|
ce9f2c4 |
Subject: [PATCH 2/2] Add memory barrier on a more arches
|
|
|
ce9f2c4 |
|
|
|
ce9f2c4 |
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
|
|
|
ce9f2c4 |
---
|
|
|
ce9f2c4 |
port/atomic_pointer.h | 4 ++--
|
|
|
ce9f2c4 |
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
ce9f2c4 |
|
|
|
ce9f2c4 |
diff --git a/port/atomic_pointer.h b/port/atomic_pointer.h
|
|
|
ce9f2c4 |
index c58bffb..ed9cee3 100644
|
|
|
ce9f2c4 |
--- a/port/atomic_pointer.h
|
|
|
ce9f2c4 |
+++ b/port/atomic_pointer.h
|
|
|
ce9f2c4 |
@@ -48,8 +48,8 @@ namespace port {
|
|
|
ce9f2c4 |
// http://msdn.microsoft.com/en-us/library/ms684208(v=vs.85).aspx
|
|
|
ce9f2c4 |
#define LEVELDB_HAVE_MEMORY_BARRIER
|
|
|
ce9f2c4 |
|
|
|
ce9f2c4 |
-// Gcc on x86
|
|
|
ce9f2c4 |
-#elif defined(ARCH_CPU_X86_FAMILY) && defined(__GNUC__)
|
|
|
ce9f2c4 |
+// GCC on x86, PPC, PPC64, MIPS, MIPS64, s390, S390x, ARM
|
|
|
ce9f2c4 |
+#elif defined(__GNUC__)
|
|
|
ce9f2c4 |
inline void MemoryBarrier() {
|
|
|
ce9f2c4 |
// See http://gcc.gnu.org/ml/gcc/2003-04/msg01180.html for a discussion on
|
|
|
ce9f2c4 |
// this idiom. Also see http://en.wikipedia.org/wiki/Memory_ordering.
|
|
|
ce9f2c4 |
--
|
|
|
ce9f2c4 |
1.7.10.4
|
|
|
ce9f2c4 |
|