Skip to content

Commit

Permalink
Merge pull request #1010 from leapmotion/fix-xcode8-warning
Browse files Browse the repository at this point in the history
Fix Xcode deprecation warning for OSMemoryBarrier()
  • Loading branch information
hham authored Oct 27, 2016
2 parents 6bde44e + 3b77df9 commit 5e1ec35
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

#if defined(__MACH__) && defined(__APPLE__)

#include <libkern/OSAtomic.h>
#include <atomic>

#include <autoboost/asio/detail/push_options.hpp>

Expand All @@ -42,13 +42,13 @@ class macos_fenced_block
// Constructor for a full fenced block.
explicit macos_fenced_block(full_t)
{
OSMemoryBarrier();
std::atomic_thread_fence(std::memory_order_seq_cst);
}

// Destructor.
~macos_fenced_block()
{
OSMemoryBarrier();
std::atomic_thread_fence(std::memory_order_seq_cst);
}
};

Expand Down

0 comments on commit 5e1ec35

Please sign in to comment.