From d489bcc2cba7c454874ae09e2e1df5d9dc6958aa Mon Sep 17 00:00:00 2001 From: Nicolas Noble Date: Wed, 18 Dec 2013 18:10:39 -0800 Subject: Removing Atomic.h and all volatiles. --- src/Async.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Async.cc') 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()); } -- cgit v1.2.3