Remove transitive dependency on <cutils/atomic.h>.

Bug: 20262261
Change-Id: Ic6c2ed76e692fc09100b917e00ee9b73621ec8f0
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 @@
       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;