aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Alc/helpers.c7
-rw-r--r--CMakeLists.txt3
-rw-r--r--common/atomic.c12
3 files changed, 14 insertions, 8 deletions
diff --git a/Alc/helpers.c b/Alc/helpers.c
index 23953270..77a660d1 100644
--- a/Alc/helpers.c
+++ b/Alc/helpers.c
@@ -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);
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b15d9a1a..2500960c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -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
diff --git a/common/atomic.c b/common/atomic.c
new file mode 100644
index 00000000..02bbf066
--- /dev/null
+++ b/common/atomic.c
@@ -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);