diff -pru include/boost/thread/win32/shared_mutex.hpp /mnt/misc/win64/mingw64-x-boost/boost_1_63_0/boost/thread/win32/shared_mutex.hpp
old
|
new
|
namespace boost
|
47 | 47 | T interlocked_compare_exchange(T* target,T new_value,T comparand) |
48 | 48 | { |
49 | 49 | BOOST_STATIC_ASSERT(sizeof(T)==sizeof(long)); |
50 | | long const res=BOOST_INTERLOCKED_COMPARE_EXCHANGE(reinterpret_cast<long*>(target), |
51 | | *reinterpret_cast<long*>(&new_value), |
52 | | *reinterpret_cast<long*>(&comparand)); |
| 50 | #ifdef __GNUC__ |
| 51 | typedef long __attribute__((__may_alias__)) long_a; |
| 52 | #else |
| 53 | typedef long long_a; |
| 54 | #endif |
| 55 | long const res=BOOST_INTERLOCKED_COMPARE_EXCHANGE(reinterpret_cast<long_a*>(target), |
| 56 | *reinterpret_cast<long_a*>(&new_value), |
| 57 | *reinterpret_cast<long_a*>(&comparand)); |
53 | 58 | return *reinterpret_cast<T const*>(&res); |
54 | 59 | } |
55 | 60 | |