Make CAS operations in Object use art::Atomic.
Make naming consistent with art::Atomic.
Change-Id: If3abdb019ef8b53bd809e3fef3fd5248aeb27e9a
diff --git a/runtime/monitor.cc b/runtime/monitor.cc
index c3ec38d..5633a77 100644
--- a/runtime/monitor.cc
+++ b/runtime/monitor.cc
@@ -163,7 +163,7 @@
}
LockWord fat(this);
// Publish the updated lock word, which may race with other threads.
- bool success = GetObject()->CasLockWord(lw, fat);
+ bool success = GetObject()->CasLockWordWeakSequentiallyConsistent(lw, fat);
// Lock profiling.
if (success && owner_ != nullptr && lock_profiling_threshold_ != 0) {
locking_method_ = owner_->GetCurrentMethod(&locking_dex_pc_);
@@ -722,7 +722,7 @@
switch (lock_word.GetState()) {
case LockWord::kUnlocked: {
LockWord thin_locked(LockWord::FromThinLockId(thread_id, 0));
- if (h_obj->CasLockWord(lock_word, thin_locked)) {
+ if (h_obj->CasLockWordWeakSequentiallyConsistent(lock_word, thin_locked)) {
// CasLockWord enforces more than the acquire ordering we need here.
return h_obj.Get(); // Success!
}