29 lines
716 B
Diff
29 lines
716 B
Diff
From 243f35070a09e1ccfbdef35450fc7b9cc6821ce5 Mon Sep 17 00:00:00 2001
|
|
Date: Fri, 8 Jul 2016 23:55:50 +0300
|
|
Subject: [PATCH] Patch for leveldb-1.7.0
|
|
|
|
---
|
|
port/atomic_pointer.h | 6 ++++++
|
|
1 file changed, 6 insertions(+)
|
|
|
|
diff --git a/port/atomic_pointer.h b/port/atomic_pointer.h
|
|
index e17bf43..00ddd70 100644
|
|
--- a/port/atomic_pointer.h
|
|
+++ b/port/atomic_pointer.h
|
|
@@ -102,6 +102,12 @@ inline void MemoryBarrier() {
|
|
}
|
|
#define LEVELDB_HAVE_MEMORY_BARRIER
|
|
|
|
+#elif defined(__e2k__) //define memory barrier
|
|
+inline void MemoryBarrier() {
|
|
+ asm volatile("wait all_c=1" : : : "memory");
|
|
+}
|
|
+#define LEVELDB_HAVE_MEMORY_BARRIER
|
|
+
|
|
#endif
|
|
|
|
// AtomicPointer built using platform-specific MemoryBarrier()
|
|
--
|
|
2.16.4
|
|
|