summaryrefslogtreecommitdiff
path: root/runtime/class_table-inl.h
diff options
context:
space:
mode:
author Orion Hodson <oth@google.com> 2018-03-06 13:35:43 +0000
committer Orion Hodson <oth@google.com> 2018-03-23 15:01:15 +0000
commit88591fe82f499de10591f5b77efac71f8954eae2 (patch)
treebfa126ad55ee091e3b615bd3bb60d5f8cfb6e37a /runtime/class_table-inl.h
parente8a4e378c5a928d5de07bee6db99150a57dabcd8 (diff)
ART: Simplify atomic.h
Prefer std::atomic operations over wrappers in atomic.h. Exceptions are cases that relate to the Java data memory operations and CAS operations. Bug: 71621075 Test: art/test.py --host -j32 Test: art/test.py --target --64 -j4 Change-Id: I9a157e9dede852c1b2aa67d22e3e604a68a9ef1c
Diffstat (limited to 'runtime/class_table-inl.h')
-rw-r--r--runtime/class_table-inl.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/class_table-inl.h b/runtime/class_table-inl.h
index c59e2e881d..5da5470c1a 100644
--- a/runtime/class_table-inl.h
+++ b/runtime/class_table-inl.h
@@ -88,7 +88,7 @@ bool ClassTable::Visit(const Visitor& visitor) {
template<ReadBarrierOption kReadBarrierOption>
inline mirror::Class* ClassTable::TableSlot::Read() const {
- const uint32_t before = data_.LoadRelaxed();
+ const uint32_t before = data_.load(std::memory_order_relaxed);
ObjPtr<mirror::Class> const before_ptr(ExtractPtr(before));
ObjPtr<mirror::Class> const after_ptr(
GcRoot<mirror::Class>(before_ptr).Read<kReadBarrierOption>());
@@ -102,7 +102,7 @@ inline mirror::Class* ClassTable::TableSlot::Read() const {
template<typename Visitor>
inline void ClassTable::TableSlot::VisitRoot(const Visitor& visitor) const {
- const uint32_t before = data_.LoadRelaxed();
+ const uint32_t before = data_.load(std::memory_order_relaxed);
ObjPtr<mirror::Class> before_ptr(ExtractPtr(before));
GcRoot<mirror::Class> root(before_ptr);
visitor.VisitRoot(root.AddressWithoutBarrier());