summaryrefslogtreecommitdiff
path: root/src/Threads.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/Threads.cc')
-rw-r--r--src/Threads.cc4
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);
}