summaryrefslogtreecommitdiff
path: root/runtime/class_table-inl.h
diff options
context:
space:
mode:
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)));
}
}