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
diff --git a/compiler/utils/atomic_dex_ref_map-inl.h b/compiler/utils/atomic_dex_ref_map-inl.h
index 33d59f9..00db09a 100644
--- a/compiler/utils/atomic_dex_ref_map-inl.h
+++ b/compiler/utils/atomic_dex_ref_map-inl.h
@@ -58,7 +58,7 @@
return kInsertResultInvalidDexFile;
}
DCHECK_LT(ref.index, array->size());
- return (*array)[ref.index].CompareExchangeStrongSequentiallyConsistent(expected, desired)
+ return (*array)[ref.index].CompareAndSetStrongSequentiallyConsistent(expected, desired)
? kInsertResultSuccess
: kInsertResultCASFailure;
}