diff options
author | 2018-03-06 13:35:43 +0000 | |
---|---|---|
committer | 2018-03-23 15:01:15 +0000 | |
commit | 88591fe82f499de10591f5b77efac71f8954eae2 (patch) | |
tree | bfa126ad55ee091e3b615bd3bb60d5f8cfb6e37a /runtime/class_table.h | |
parent | e8a4e378c5a928d5de07bee6db99150a57dabcd8 (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.h')
-rw-r--r-- | runtime/class_table.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/runtime/class_table.h b/runtime/class_table.h index 3e90fe2768..0b08041dbd 100644 --- a/runtime/class_table.h +++ b/runtime/class_table.h @@ -53,14 +53,14 @@ class ClassTable { public: TableSlot() : data_(0u) {} - TableSlot(const TableSlot& copy) : data_(copy.data_.LoadRelaxed()) {} + TableSlot(const TableSlot& copy) : data_(copy.data_.load(std::memory_order_relaxed)) {} explicit TableSlot(ObjPtr<mirror::Class> klass); TableSlot(ObjPtr<mirror::Class> klass, uint32_t descriptor_hash); TableSlot& operator=(const TableSlot& copy) { - data_.StoreRelaxed(copy.data_.LoadRelaxed()); + data_.store(copy.data_.load(std::memory_order_relaxed), std::memory_order_relaxed); return *this; } @@ -69,7 +69,7 @@ class ClassTable { } uint32_t Hash() const { - return MaskHash(data_.LoadRelaxed()); + return MaskHash(data_.load(std::memory_order_relaxed)); } static uint32_t MaskHash(uint32_t hash) { |