summaryrefslogtreecommitdiffstats
path: root/compiler/driver/compiler_driver.cc
diff options
context:
space:
mode:
authorIan Rogers <irogers@google.com>2014-05-20 16:40:37 -0700
committerIan Rogers <irogers@google.com>2014-05-20 21:17:03 -0700
commit3e5cf305db800b2989ad57b7cde8fb3cc9fa1b9e (patch)
tree52a737323ebd505cf37ca0e4b2dcee6524fba07f /compiler/driver/compiler_driver.cc
parent27a2b70f612af9afc0fb5392fb10059f6a0a3569 (diff)
downloadart-3e5cf305db800b2989ad57b7cde8fb3cc9fa1b9e.zip
art-3e5cf305db800b2989ad57b7cde8fb3cc9fa1b9e.tar.gz
art-3e5cf305db800b2989ad57b7cde8fb3cc9fa1b9e.tar.bz2
Begin migration of art::Atomic to std::atomic.
Change-Id: I4858d9cbed95e5ca560956b9dabd976cebe68333
Diffstat (limited to 'compiler/driver/compiler_driver.cc')
-rw-r--r--compiler/driver/compiler_driver.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/driver/compiler_driver.cc b/compiler/driver/compiler_driver.cc
index eb62f1b..999d6a5 100644
--- a/compiler/driver/compiler_driver.cc
+++ b/compiler/driver/compiler_driver.cc
@@ -1369,7 +1369,7 @@ class ParallelCompilationManager {
self->AssertNoPendingException();
CHECK_GT(work_units, 0U);
- index_ = begin;
+ index_.StoreRelaxed(begin);
for (size_t i = 0; i < work_units; ++i) {
thread_pool_->AddTask(self, new ForAllClosure(this, end, callback));
}
@@ -1384,7 +1384,7 @@ class ParallelCompilationManager {
}
size_t NextIndex() {
- return index_.FetchAndAdd(1);
+ return index_.FetchAndAddSequentiallyConsistent(1);
}
private: