src/hotspot/share/services/mallocSiteTable.cpp
changeset 48488 51825789dd89
parent 47765 b7c7428eaab9
child 50965 29eaf3feab30
child 50976 59ee619866c3
--- a/src/hotspot/share/services/mallocSiteTable.cpp	Wed Jan 03 17:29:20 2018 +0000
+++ b/src/hotspot/share/services/mallocSiteTable.cpp	Thu Jan 04 18:18:18 2018 -0500
@@ -147,7 +147,7 @@
     if (entry == NULL) return NULL;
 
     // swap in the head
-    if (Atomic::cmpxchg(entry, &_table[index], (MallocSiteHashtableEntry*)NULL) == NULL) {
+    if (Atomic::replace_if_null(entry, &_table[index])) {
       return entry->data();
     }
 
@@ -259,5 +259,5 @@
 }
 
 bool MallocSiteHashtableEntry::atomic_insert(MallocSiteHashtableEntry* entry) {
-  return Atomic::cmpxchg(entry, &_next, (MallocSiteHashtableEntry*)NULL) == NULL;
+  return Atomic::replace_if_null(entry, &_next);
 }