瀏覽代碼

Fix Android/MIPS build.

port/atomic_pointer.h was missing an implementation for
MemoryBarrier() for this platform.
pull/1/head
David Turner 10 年之前
committed by Mike Frysinger
父節點
當前提交
ceff6f1215
共有 1 個檔案被更改,包括 9 行新增0 行删除
  1. +9
    -0
      port/atomic_pointer.h

+ 9
- 0
port/atomic_pointer.h 查看文件

@ -39,6 +39,8 @@
#define ARCH_CPU_ARM64_FAMILY 1
#elif defined(__ppc__) || defined(__powerpc__) || defined(__powerpc64__)
#define ARCH_CPU_PPC_FAMILY 1
#elif defined(__mips__)
#define ARCH_CPU_MIPS_FAMILY 1
#endif
namespace leveldb {
@ -110,6 +112,13 @@ inline void MemoryBarrier() {
}
#define LEVELDB_HAVE_MEMORY_BARRIER
// MIPS
#elif defined(ARCH_CPU_MIPS_FAMILY) && defined(__GNUC__)
inline void MemoryBarrier() {
__asm__ __volatile__("sync" : : : "memory");
}
#define LEVELDB_HAVE_MEMORY_BARRIER
#endif
// AtomicPointer built using platform-specific MemoryBarrier()

Loading…
取消
儲存