summaryrefslogtreecommitdiff
path: root/runtime/class_table-inl.h
diff options
context:
space:
mode:
author Orion Hodson <oth@google.com> 2018-01-03 11:47:54 +0000
committer Orion Hodson <oth@google.com> 2018-01-03 12:45:40 +0000
commit4557b3858a66aa20e42bce937e1f0620aad880a2 (patch)
tree8f34d8f014b11f17c6351bb955fcc74c940b8d16 /runtime/class_table-inl.h
parent90f20973356900e340998e8e2b34230e5c4c8fb0 (diff)
ART: Rename Atomic::CompareExchange methods
Renames Atomic::CompareExchange methods to Atomic::CompareAndSet equivalents. These methods return a boolean and do not get the witness value. This makes space for Atomic::CompareAndExchange methods in a later commit that will return a boolean and get the witness value. This is pre-work for VarHandle accessors which require both forms. Bug: 65872996 Test: art/test.py --host -j32 Change-Id: I9c691250e5556cbfde7811381b06d2920247f1a1
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 1280466a91..718e93a97d 100644
--- a/runtime/class_table-inl.h
+++ b/runtime/class_table-inl.h
@@ -95,7 +95,7 @@ inline mirror::Class* ClassTable::TableSlot::Read() const {
if (kReadBarrierOption != kWithoutReadBarrier && before_ptr != after_ptr) {
// If another thread raced and updated the reference, do not store the read barrier updated
// one.
- data_.CompareExchangeStrongRelease(before, Encode(after_ptr, MaskHash(before)));
+ data_.CompareAndSetStrongRelease(before, Encode(after_ptr, MaskHash(before)));
}
return after_ptr.Ptr();
}
@@ -110,7 +110,7 @@ inline void ClassTable::TableSlot::VisitRoot(const Visitor& visitor) const {
if (before_ptr != after_ptr) {
// If another thread raced and updated the reference, do not store the read barrier updated
// one.
- data_.CompareExchangeStrongRelease(before, Encode(after_ptr, MaskHash(before)));
+ data_.CompareAndSetStrongRelease(before, Encode(after_ptr, MaskHash(before)));
}
}