Commit c4c38f9 1 parent cea9b10 commit c4c38f9 Copy full SHA for c4c38f9
File tree 1 file changed +10
-0
lines changed
1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change 35
35
#define ARCH_CPU_X86_FAMILY 1
36
36
#elif defined(__ARMEL__)
37
37
#define ARCH_CPU_ARM_FAMILY 1
38
+ #elif defined(__aarch64__)
39
+ #define ARCH_CPU_ARM64_FAMILY 1
38
40
#elif defined(__ppc__) || defined(__powerpc__) || defined(__powerpc64__)
39
41
#define ARCH_CPU_PPC_FAMILY 1
40
42
#endif
@@ -92,6 +94,13 @@ inline void MemoryBarrier() {
92
94
}
93
95
#define LEVELDB_HAVE_MEMORY_BARRIER
94
96
97
+ // ARM64
98
+ #elif defined(ARCH_CPU_ARM64_FAMILY)
99
+ inline void MemoryBarrier () {
100
+ asm volatile (" dmb sy" : : : " memory" );
101
+ }
102
+ #define LEVELDB_HAVE_MEMORY_BARRIER
103
+
95
104
// PPC
96
105
#elif defined(ARCH_CPU_PPC_FAMILY) && defined(__GNUC__)
97
106
inline void MemoryBarrier () {
@@ -215,6 +224,7 @@ class AtomicPointer {
215
224
#undef LEVELDB_HAVE_MEMORY_BARRIER
216
225
#undef ARCH_CPU_X86_FAMILY
217
226
#undef ARCH_CPU_ARM_FAMILY
227
+ #undef ARCH_CPU_ARM64_FAMILY
218
228
#undef ARCH_CPU_PPC_FAMILY
219
229
220
230
} // namespace port
You can’t perform that action at this time.
0 commit comments