mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-06 06:34:35 +00:00
atomic: Use acquire/release InterlockedExchange intrinsics on ARM64EC
(cherry picked from commit 15275898f0)
This commit is contained in:
parent
565ed27620
commit
6c5a82ba77
1 changed files with 2 additions and 2 deletions
|
|
@ -84,7 +84,7 @@ SDL_bool SDL_AtomicTryLock(SDL_SpinLock *lock)
|
|||
#elif defined(HAVE_GCC_ATOMICS) || defined(HAVE_GCC_SYNC_LOCK_TEST_AND_SET)
|
||||
return __sync_lock_test_and_set(lock, 1) == 0;
|
||||
|
||||
#elif defined(_MSC_VER) && (defined(_M_ARM) || defined(_M_ARM64))
|
||||
#elif defined(_MSC_VER) && (defined(_M_ARM) || defined(_M_ARM64) || defined(_M_ARM64EC))
|
||||
return _InterlockedExchange_acq(lock, 1) == 0;
|
||||
|
||||
#elif defined(_MSC_VER)
|
||||
|
|
@ -189,7 +189,7 @@ void SDL_AtomicUnlock(SDL_SpinLock *lock)
|
|||
#if defined(HAVE_GCC_ATOMICS) || defined(HAVE_GCC_SYNC_LOCK_TEST_AND_SET)
|
||||
__sync_lock_release(lock);
|
||||
|
||||
#elif defined(_MSC_VER) && (defined(_M_ARM) || defined(_M_ARM64))
|
||||
#elif defined(_MSC_VER) && (defined(_M_ARM) || defined(_M_ARM64) || defined(_M_ARM64EC))
|
||||
_InterlockedExchange_rel(lock, 0);
|
||||
|
||||
#elif defined(_MSC_VER)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue