Merge pull request #9802 from vnen/fix-uwp-build
UWP: Fix build issue caused by atomic operations
This commit is contained in:
commit
574ec97b8b
|
@ -185,7 +185,7 @@ static _ALWAYS_INLINE_ uint64_t _atomic_increment_impl(register uint64_t *pw) {
|
||||||
|
|
||||||
static _ALWAYS_INLINE_ uint64_t _atomic_sub_impl(register uint64_t *pw, register uint64_t val) {
|
static _ALWAYS_INLINE_ uint64_t _atomic_sub_impl(register uint64_t *pw, register uint64_t val) {
|
||||||
|
|
||||||
#if _WIN32_WINNT >= 0x0601 // Windows 7+
|
#if _WIN32_WINNT >= 0x0601 && !defined(UWP_ENABLED) // Windows 7+ except UWP
|
||||||
return InterlockedExchangeSubtract64(pw, val) - val;
|
return InterlockedExchangeSubtract64(pw, val) - val;
|
||||||
#else
|
#else
|
||||||
return InterlockedExchangeAdd64((LONGLONG volatile *)pw, -(int64_t)val) - val;
|
return InterlockedExchangeAdd64((LONGLONG volatile *)pw, -(int64_t)val) - val;
|
||||||
|
|
Loading…
Reference in New Issue