equal
deleted
inserted
replaced
1029 // discovered_addr. |
1029 // discovered_addr. |
1030 oop current_head = refs_list.head(); |
1030 oop current_head = refs_list.head(); |
1031 // The last ref must have its discovered field pointing to itself. |
1031 // The last ref must have its discovered field pointing to itself. |
1032 oop next_discovered = (current_head != NULL) ? current_head : obj; |
1032 oop next_discovered = (current_head != NULL) ? current_head : obj; |
1033 |
1033 |
1034 oop retest = HeapAccess<AS_NO_KEEPALIVE>::oop_atomic_cmpxchg(next_discovered, discovered_addr, oop(NULL)); |
1034 oop retest = HeapAccess<AS_NO_KEEPALIVE>::oop_atomic_cmpxchg(discovered_addr, oop(NULL), next_discovered); |
1035 |
1035 |
1036 if (retest == NULL) { |
1036 if (retest == NULL) { |
1037 // This thread just won the right to enqueue the object. |
1037 // This thread just won the right to enqueue the object. |
1038 // We have separate lists for enqueueing, so no synchronization |
1038 // We have separate lists for enqueueing, so no synchronization |
1039 // is necessary. |
1039 // is necessary. |