< prev index next >

src/hotspot/share/gc/g1/g1HotCardCache.cpp

Print this page

        

@@ -76,13 +76,13 @@
   // against the unlikely event of a race resulting in another card pointer to
   // have already been written to the cache. In this case we will return
   // card_ptr in favor of the other option, which would be starting over. This
   // should be OK since card_ptr will likely be the older card already when/if
   // this ever happens.
-  CardValue* previous_ptr = Atomic::cmpxchg(card_ptr,
-                                            &_hot_cache[masked_index],
-                                            current_ptr);
+  CardValue* previous_ptr = Atomic::cmpxchg(&_hot_cache[masked_index],
+                                            current_ptr,
+                                            card_ptr);
   return (previous_ptr == current_ptr) ? previous_ptr : card_ptr;
 }
 
 void G1HotCardCache::drain(G1CardTableEntryClosure* cl, uint worker_id) {
   assert(default_use_cache(), "Drain only necessary if we use the hot card cache.");
< prev index next >