< prev index next >
src/hotspot/share/gc/shared/workgroup.cpp
Print this page
@@ -162,11 +162,11 @@
}
void worker_done_with_task() {
// Mark that the worker is done with the task.
// The worker is not allowed to read the state variables after this line.
- uint not_finished = Atomic::sub(1u, &_not_finished);
+ uint not_finished = Atomic::sub(&_not_finished, 1u);
// The last worker signals to the coordinator that all work is completed.
if (not_finished == 0) {
_end_semaphore->signal();
}
< prev index next >