Skip to content

Commit

Permalink
Remove the deprecated OSMemoryBarrier
Browse files Browse the repository at this point in the history
  • Loading branch information
DesWurstes committed Aug 9, 2018
1 parent 64052c7 commit 7d9b387
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions port/atomic_pointer.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,12 @@
#define PORT_ATOMIC_POINTER_H_

#include <stdint.h>
#ifdef LEVELDB_ATOMIC_PRESENT
#if defined(LEVELDB_ATOMIC_PRESENT) || defined(OS_MACOSX)
#include <atomic>
#endif
#ifdef OS_WIN
#include <windows.h>
#endif
#ifdef OS_MACOSX
#include <libkern/OSAtomic.h>
#endif

#if defined(_M_X64) || defined(__x86_64__)
#define ARCH_CPU_X86_FAMILY 1
Expand Down Expand Up @@ -80,7 +77,7 @@ class AtomicPointer {
// Mac OS
#elif defined(OS_MACOSX)
inline void MemoryBarrier() {
OSMemoryBarrier();
std::atomic_thread_fence(std::memory_order_seq_cst);
}
#define LEVELDB_HAVE_MEMORY_BARRIER

Expand Down

0 comments on commit 7d9b387

Please sign in to comment.