summaryrefslogtreecommitdiff
path: root/src/Async.cc
diff options
context:
space:
mode:
authorNicolas Noble <pixel@nobis-crew.org>2013-12-18 18:10:39 -0800
committerNicolas Noble <pixel@nobis-crew.org>2013-12-18 18:10:39 -0800
commitd489bcc2cba7c454874ae09e2e1df5d9dc6958aa (patch)
treedcf09d48f609fd7a7834e311663a3885b17459bf /src/Async.cc
parent9e2b2679cb94ba4950aa98323e4c61a3e53546e2 (diff)
Removing Atomic.h and all volatiles.
Diffstat (limited to 'src/Async.cc')
-rw-r--r--src/Async.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Async.cc b/src/Async.cc
index 09465d3..a638451 100644
--- a/src/Async.cc
+++ b/src/Async.cc
@@ -103,7 +103,7 @@ void * Balau::AsyncManager::proc() {
stopAllWorkers();
Printer::elog(E_ASYNC, "Async thread waits for all idle queues to empty");
- while (Atomic::Prefetch::Decrement(&m_numTLSes)) {
+ while (m_numTLSes--) {
TLS * tls = m_TLSes.pop();
while (!tls->idleQueue.isEmpty());
}
@@ -166,7 +166,7 @@ void Balau::AsyncManager::idle() {
void Balau::AsyncManager::threadExit() {
Printer::elog(E_ASYNC, "AsyncManager thread is being asked to stop; creating stopper");
- if (Atomic::CmpXChgBool(&m_stopperPushed, true, false))
+ if (!m_stopperPushed.exchange(true))
m_queue.push(new AsyncStopper());
}