diff options
author | John Emmas <johne53@tiscali.co.uk> | 2014-05-06 09:41:40 +0100 |
---|---|---|
committer | John Emmas <johne53@tiscali.co.uk> | 2014-05-06 09:41:40 +0100 |
commit | 18245b06d03fea322b0d7665e7eb9fc028b92d41 (patch) | |
tree | 190f86c6359307e32f094a7003c09a59f58a749b /libs | |
parent | b9fab9ea280e63ed9edbe27a673471a91594fe9d (diff) |
'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
Diffstat (limited to 'libs')
-rw-r--r-- | libs/backends/wavesaudio/wavesapi/threads/WCThreadSafe.cpp | 6 |
1 files 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 <glib.h> + #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<int32_t>(&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; |