diff options
author | Nicolas Noble <pixel@nobis-crew.org> | 2013-12-18 18:10:39 -0800 |
---|---|---|
committer | Nicolas Noble <pixel@nobis-crew.org> | 2013-12-18 18:10:39 -0800 |
commit | d489bcc2cba7c454874ae09e2e1df5d9dc6958aa (patch) | |
tree | dcf09d48f609fd7a7834e311663a3885b17459bf /src/Threads.cc | |
parent | 9e2b2679cb94ba4950aa98323e4c61a3e53546e2 (diff) |
Removing Atomic.h and all volatiles.
Diffstat (limited to 'src/Threads.cc')
-rw-r--r-- | src/Threads.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Threads.cc b/src/Threads.cc index 6de9186..c05d23f 100644 --- a/src/Threads.cc +++ b/src/Threads.cc @@ -1,7 +1,7 @@ +#include <atomic> #include "Exceptions.h" #include "Threads.h" #include "Local.h" -#include "Atomic.h" #include "TaskMan.h" namespace Balau { @@ -90,7 +90,7 @@ Balau::Thread::~Thread() { void * Balau::Thread::join() { void * r = NULL; - if (Atomic::CmpXChgBool(&m_joined, true, false)) { + if (!m_joined.exchange(true)) { threadExit(); pthread_join(m_thread, &r); } |