< prev index next >
src/hotspot/share/gc/shared/satbMarkQueue.cpp
Print this page
@@ -134,11 +134,11 @@
do {
old = value;
value += 2;
assert(value > old, "overflow");
if (value > threshold) value |= 1;
- value = Atomic::cmpxchg(value, cfptr, old);
+ value = Atomic::cmpxchg(cfptr, old, value);
} while (value != old);
}
// Decrement count. If count == 0, clear flag, else maintain flag.
static void decrement_count(volatile size_t* cfptr) {
@@ -147,11 +147,11 @@
do {
assert((value >> 1) != 0, "underflow");
old = value;
value -= 2;
if (value <= 1) value = 0;
- value = Atomic::cmpxchg(value, cfptr, old);
+ value = Atomic::cmpxchg(cfptr, old, value);
} while (value != old);
}
void SATBMarkQueueSet::set_process_completed_buffers_threshold(size_t value) {
// Scale requested threshold to align with count field. If scaling
@@ -327,11 +327,11 @@
tty->cr();
}
#endif // PRODUCT
void SATBMarkQueueSet::abandon_completed_buffers() {
- Atomic::store(size_t(0), &_count_and_process_flag);
+ Atomic::store(&_count_and_process_flag, size_t(0));
BufferNode* buffers_to_delete = _list.pop_all();
while (buffers_to_delete != NULL) {
BufferNode* bn = buffers_to_delete;
buffers_to_delete = bn->next();
bn->set_next(NULL);
< prev index next >