Browse files

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

  • Loading branch information...
rogerman committed Jan 10, 2019
1 parent abc0649 commit 4a13a03f468ff985e851c021da1300061fc37f54
Showing with 2 additions and 2 deletions.
  1. +2 −2 desmume/src/types.h
@@ -307,8 +307,8 @@ typedef int desmume_BOOL;
#include <winnt.h>

//#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))
#define atomic_add_barrier32(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); }
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) _InterlockedIncrement((volatile LONG *)(V))

0 comments on commit 4a13a03

Please sign in to comment.