Merge pull request #1459 from tkoeppe/master

Add missing relaxed memory ordering.
This commit is contained in:
Pieter Hintjens 2015-06-30 23:35:29 +02:00
commit 80b1e67e45

View File

@ -153,7 +153,7 @@ namespace zmq
__ATOMIC_RELEASE, __ATOMIC_ACQUIRE);
return old;
#elif defined ZMQ_ATOMIC_CXX11
ptr.compare_exchange_strong(cmp_, val_);
ptr.compare_exchange_strong(cmp_, val_, std::memory_order_acq_rel);
return cmp_;
#elif defined ZMQ_ATOMIC_PTR_ATOMIC_H
return (T*) atomic_cas_ptr (&ptr, cmp_, val_);