diff options
| author | 2014-05-20 16:40:37 -0700 | |
|---|---|---|
| committer | 2014-05-20 21:17:03 -0700 | |
| commit | 3e5cf305db800b2989ad57b7cde8fb3cc9fa1b9e (patch) | |
| tree | 52a737323ebd505cf37ca0e4b2dcee6524fba07f /compiler/driver/compiler_driver.cc | |
| parent | 27a2b70f612af9afc0fb5392fb10059f6a0a3569 (diff) | |
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.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/driver/compiler_driver.cc b/compiler/driver/compiler_driver.cc index eb62f1b577..999d6a55a9 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: |