src/hotspot/share/gc/shared/referenceProcessor.cpp
changeset 50920 d9160a3c97c1
parent 50606 8f1d5d706bdd
child 51332 c25572739e7c
equal deleted inserted replaced
50919:803cfa425026 50920:d9160a3c97c1
  1031   // discovered_addr.
  1031   // discovered_addr.
  1032   oop current_head = refs_list.head();
  1032   oop current_head = refs_list.head();
  1033   // The last ref must have its discovered field pointing to itself.
  1033   // The last ref must have its discovered field pointing to itself.
  1034   oop next_discovered = (current_head != NULL) ? current_head : obj;
  1034   oop next_discovered = (current_head != NULL) ? current_head : obj;
  1035 
  1035 
  1036   oop retest = RawAccess<>::oop_atomic_cmpxchg(next_discovered, discovered_addr, oop(NULL));
  1036   oop retest = HeapAccess<AS_NO_KEEPALIVE>::oop_atomic_cmpxchg(next_discovered, discovered_addr, oop(NULL));
  1037 
  1037 
  1038   if (retest == NULL) {
  1038   if (retest == NULL) {
  1039     // This thread just won the right to enqueue the object.
  1039     // This thread just won the right to enqueue the object.
  1040     // We have separate lists for enqueueing, so no synchronization
  1040     // We have separate lists for enqueueing, so no synchronization
  1041     // is necessary.
  1041     // is necessary.