mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 22:34:27 +02:00
8194406: Use Atomic::replace_if_null
Reviewed-by: coleenp, dholmes
This commit is contained in:
parent
c7e601e911
commit
9e5bf18428
9 changed files with 17 additions and 18 deletions
|
@ -446,7 +446,7 @@ MethodCounters* Method::build_method_counters(Method* m, TRAPS) {
|
|||
|
||||
bool Method::init_method_counters(MethodCounters* counters) {
|
||||
// Try to install a pointer to MethodCounters, return true on success.
|
||||
return Atomic::cmpxchg(counters, &_method_counters, (MethodCounters*)NULL) == NULL;
|
||||
return Atomic::replace_if_null(counters, &_method_counters);
|
||||
}
|
||||
|
||||
void Method::cleanup_inline_caches() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue