Move atomic method definitions to a separate common source

This commit is contained in:
Chris Robinson
2014-05-06 19:07:40 -07:00
parent fa12855d19
commit 1aff37114a
3 changed files with 14 additions and 8 deletions
-7
View File
@@ -93,13 +93,6 @@ DEFINE_DEVPROPKEY(DEVPKEY_Device_FriendlyName, 0xa45c254e, 0xdf1c, 0x4efd, 0x80,
#include "threads.h"
extern inline RefCount IncrementRef(volatile RefCount *ptr);
extern inline RefCount DecrementRef(volatile RefCount *ptr);
extern inline int ExchangeInt(volatile int *ptr, int newval);
extern inline void *ExchangePtr(XchgPtr *ptr, void *newval);
extern inline int CompExchangeInt(volatile int *ptr, int oldval, int newval);
extern inline void *CompExchangePtr(XchgPtr *ptr, void *oldval, void *newval);
extern inline void LockUIntMapRead(UIntMap *map);
extern inline void UnlockUIntMapRead(UIntMap *map);
extern inline void LockUIntMapWrite(UIntMap *map);
+2 -1
View File
@@ -487,7 +487,8 @@ IF(NOT HAVE_STDINT_H)
ENDIF()
SET(COMMON_OBJS common/threads.c
SET(COMMON_OBJS common/atomic.c
common/threads.c
)
SET(OPENAL_OBJS OpenAL32/alAuxEffectSlot.c
OpenAL32/alBuffer.c
+12
View File
@@ -0,0 +1,12 @@
#include "config.h"
#include "atomic.h"
extern inline RefCount IncrementRef(volatile RefCount *ptr);
extern inline RefCount DecrementRef(volatile RefCount *ptr);
extern inline int ExchangeInt(volatile int *ptr, int newval);
extern inline void *ExchangePtr(XchgPtr *ptr, void *newval);
extern inline int CompExchangeInt(volatile int *ptr, int oldval, int newval);
extern inline void *CompExchangePtr(XchgPtr *ptr, void *oldval, void *newval);