Windows Port: Fix compiling on 32-bit Windows. (Regression from commit abc0649.)

This commit is contained in:
rogerman 2019-01-09 23:40:32 -08:00
parent abc0649ad2
commit 4a13a03f46
1 changed files with 2 additions and 2 deletions

View File

@ -307,8 +307,8 @@ typedef int desmume_BOOL;
#include <winnt.h> #include <winnt.h>
//#define atomic_add_32(V,M) InterlockedAddNoFence((volatile LONG *)(V),(LONG)(M)) // Requires Windows 8 //#define atomic_add_32(V,M) InterlockedAddNoFence((volatile LONG *)(V),(LONG)(M)) // Requires Windows 8
#define atomic_add_32(V,M) _InterlockedAdd((volatile LONG *)(V),(LONG)(M)) inline s32 atomic_add_32(volatile s32 *V, s32 M) { return (s32)(InterlockedExchangeAdd((volatile LONG *)V, (LONG)M) + M); }
#define atomic_add_barrier32(V,M) _InterlockedAdd((volatile LONG *)(V),(LONG)(M)) inline s32 atomic_add_barrier32(volatile s32 *V, s32 M) { return (s32)(InterlockedExchangeAdd((volatile LONG *)V, (LONG)M) + M); }
//#define atomic_inc_32(V) InterlockedIncrementNoFence((volatile LONG *)(V)) // Requires Windows 8 //#define atomic_inc_32(V) InterlockedIncrementNoFence((volatile LONG *)(V)) // Requires Windows 8
#define atomic_inc_32(V) _InterlockedIncrement((volatile LONG *)(V)) #define atomic_inc_32(V) _InterlockedIncrement((volatile LONG *)(V))