From 18245b06d03fea322b0d7665e7eb9fc028b92d41 Mon Sep 17 00:00:00 2001 From: John Emmas Date: Tue, 6 May 2014 09:41:40 +0100 Subject: [PATCH] 'atomic_ops' to use glib, rather than Waves's inbuilt atomic operations Note that the following source files can be removed once we know this works on all platforms:- backends/wavesaudio/wavesapi/akupara/threading/atomic_ops.hpp backends/wavesaudio/wavesapi/akupara/threading/atomic_ops_gcc_x96.hpp backends/wavesaudio/wavesapi/akupara/basics.hpp backends/wavesaudio/wavesapi/akupara/compiletime_functions.hpp --- libs/backends/wavesaudio/wavesapi/threads/WCThreadSafe.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/backends/wavesaudio/wavesapi/threads/WCThreadSafe.cpp b/libs/backends/wavesaudio/wavesapi/threads/WCThreadSafe.cpp index 22202894b3..32e099b518 100644 --- a/libs/backends/wavesaudio/wavesapi/threads/WCThreadSafe.cpp +++ b/libs/backends/wavesaudio/wavesapi/threads/WCThreadSafe.cpp @@ -1,5 +1,6 @@ #include "Threads/WCThreadSafe.h" - +#include + #if XPLATFORMTHREADS_WINDOWS #define _WIN32_WINNT 0x0500 // need at least Windows2000 (for TryEnterCriticalSection() and SignalObjectAndWait() #include "IncludeWindows.h" @@ -28,7 +29,6 @@ static int (*BSDfread)( void *, size_t, size_t, FILE * ) = 0; #endif //XPLATFORMTHREADS_POSIX -#include "Akupara/threading/atomic_ops.hpp" namespace wvNS { static const unsigned int knMicrosecondsPerSecond = 1000*1000; static const unsigned int knNanosecondsPerMicrosecond = 1000; @@ -798,7 +798,7 @@ namespace wvThread uint32_t timeOut = in_num_trys; while (true) { - retVal = Akupara::threading::atomic::compare_and_store(&m_the_lock, int32_t(0), int32_t(1)); + retVal = g_atomic_int_compare_and_exchange(&m_the_lock, gint(0), gint(1)); if (retVal) { break; -- 2.30.2