< prev index next >

src/share/vm/gc/g1/g1ConcurrentMark.cpp

Print this page
rev 13453 : imported patch Atomic_add

*** 198,208 **** // wraparound of _hwm. if (_hwm >= _chunk_capacity) { return NULL; } ! size_t cur_idx = Atomic::add(1, &_hwm) - 1; if (cur_idx >= _chunk_capacity) { return NULL; } TaskQueueEntryChunk* result = ::new (&_base[cur_idx]) TaskQueueEntryChunk; --- 198,208 ---- // wraparound of _hwm. if (_hwm >= _chunk_capacity) { return NULL; } ! size_t cur_idx = Atomic::add(1u, &_hwm) - 1; if (cur_idx >= _chunk_capacity) { return NULL; } TaskQueueEntryChunk* result = ::new (&_base[cur_idx]) TaskQueueEntryChunk;
< prev index next >