diff options
author | Yabin Cui <yabinc@google.com> | 2015-04-15 15:40:18 -0700 |
---|---|---|
committer | Yabin Cui <yabinc@google.com> | 2015-04-16 10:57:05 -0700 |
commit | c7df66e2cb124d261cf3b0691a09a3b6e357b6f1 (patch) | |
tree | f8ddfd8b0316dd11c9af12283acdd02b7a15eb08 /runtime/gc | |
parent | a76a08fed88bd081bcc4d240f1ba3472a2acbbab (diff) | |
download | art-c7df66e2cb124d261cf3b0691a09a3b6e357b6f1.zip art-c7df66e2cb124d261cf3b0691a09a3b6e357b6f1.tar.gz art-c7df66e2cb124d261cf3b0691a09a3b6e357b6f1.tar.bz2 |
Remove transitive dependency on <cutils/atomic.h>.
Bug: 20262261
Change-Id: Ic6c2ed76e692fc09100b917e00ee9b73621ec8f0
Diffstat (limited to 'runtime/gc')
-rw-r--r-- | runtime/gc/collector/mark_sweep.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/runtime/gc/collector/mark_sweep.cc b/runtime/gc/collector/mark_sweep.cc index bb8d876..b3938cc 100644 --- a/runtime/gc/collector/mark_sweep.cc +++ b/runtime/gc/collector/mark_sweep.cc @@ -16,6 +16,7 @@ #include "mark_sweep.h" +#include <atomic> #include <functional> #include <numeric> #include <climits> @@ -600,7 +601,7 @@ class MarkStackTask : public Task { mirror::Object* ref = obj->GetFieldObject<mirror::Object>(offset); if (ref != nullptr && mark_sweep_->MarkObjectParallel(ref)) { if (kUseFinger) { - android_memory_barrier(); + std::atomic_thread_fence(std::memory_order_seq_cst); if (reinterpret_cast<uintptr_t>(ref) >= static_cast<uintptr_t>(mark_sweep_->atomic_finger_.LoadRelaxed())) { return; |