Skip to content

Commit

Permalink
Fix Xcode 8 deprecation warning on memory barrier
Browse files Browse the repository at this point in the history
  • Loading branch information
jdonald committed Oct 26, 2016
1 parent 6bde44e commit 3b77df9
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 3b77df9

Please sign in to comment.