Migrate to modern TBB version
This commit is contained in:
parent
51cfb1e508
commit
2c6527a562
@ -95,9 +95,9 @@ inline WordT set_upper_value(WordT word, WordT mask, std::uint8_t offset, T valu
|
|||||||
inline bool compare_and_swap(uint64_t *ptr, uint64_t old_value, uint64_t new_value)
|
inline bool compare_and_swap(uint64_t *ptr, uint64_t old_value, uint64_t new_value)
|
||||||
{
|
{
|
||||||
#if defined(_MSC_VER)
|
#if defined(_MSC_VER)
|
||||||
return InterlockedCompareExchange64(reinterpret_cast<int64_t *>(ptr),
|
return InterlockedCompareExchange64(reinterpret_cast<LONG64 *>(ptr),
|
||||||
static_cast<int64_t>(new_value),
|
static_cast<LONG64>(new_value),
|
||||||
static_cast<int64_t>(old_value)) == old_value;
|
static_cast<LONG64>(old_value)) == old_value;
|
||||||
#elif defined(__GNUC__)
|
#elif defined(__GNUC__)
|
||||||
return __sync_bool_compare_and_swap(ptr, old_value, new_value);
|
return __sync_bool_compare_and_swap(ptr, old_value, new_value);
|
||||||
#else
|
#else
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user