mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-17 17:44:40 +02:00
8234737: Harmonize parameter order in Atomic - add
Reviewed-by: rehn, dholmes
This commit is contained in:
parent
8db2c1158e
commit
d45ec50076
82 changed files with 234 additions and 229 deletions
|
@ -179,7 +179,7 @@ private:
|
|||
|
||||
bool marked_as_dirty = Atomic::cmpxchg(true, &_contains[region], false) == false;
|
||||
if (marked_as_dirty) {
|
||||
uint allocated = Atomic::add(1u, &_cur_idx) - 1;
|
||||
uint allocated = Atomic::add(&_cur_idx, 1u) - 1;
|
||||
_buffer[allocated] = region;
|
||||
}
|
||||
}
|
||||
|
@ -255,7 +255,7 @@ private:
|
|||
|
||||
void work(uint worker_id) {
|
||||
while (_cur_dirty_regions < _regions->size()) {
|
||||
uint next = Atomic::add(_chunk_length, &_cur_dirty_regions) - _chunk_length;
|
||||
uint next = Atomic::add(&_cur_dirty_regions, _chunk_length) - _chunk_length;
|
||||
uint max = MIN2(next + _chunk_length, _regions->size());
|
||||
|
||||
for (uint i = next; i < max; i++) {
|
||||
|
@ -447,7 +447,7 @@ public:
|
|||
|
||||
uint claim_cards_to_scan(uint region, uint increment) {
|
||||
assert(region < _max_regions, "Tried to access invalid region %u", region);
|
||||
return Atomic::add(increment, &_card_table_scan_state[region]) - increment;
|
||||
return Atomic::add(&_card_table_scan_state[region], increment) - increment;
|
||||
}
|
||||
|
||||
void add_dirty_region(uint const region) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue