'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
This commit is contained in:
parent
b9fab9ea28
commit
18245b06d0
@ -1,4 +1,5 @@
|
||||
#include "Threads/WCThreadSafe.h"
|
||||
#include <glib.h>
|
||||
|
||||
#if XPLATFORMTHREADS_WINDOWS
|
||||
#define _WIN32_WINNT 0x0500 // need at least Windows2000 (for TryEnterCriticalSection() and SignalObjectAndWait()
|
||||
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user