src/hotspot/share/gc/shared/workgroup.cpp
changeset 59250 a6deb69743d4
parent 59249 29b0d0b61615
child 59252 623722a6aeb9
equal deleted inserted replaced
59249:29b0d0b61615 59250:a6deb69743d4
   162   }
   162   }
   163 
   163 
   164   void worker_done_with_task() {
   164   void worker_done_with_task() {
   165     // Mark that the worker is done with the task.
   165     // Mark that the worker is done with the task.
   166     // The worker is not allowed to read the state variables after this line.
   166     // The worker is not allowed to read the state variables after this line.
   167     uint not_finished = Atomic::sub(1u, &_not_finished);
   167     uint not_finished = Atomic::sub(&_not_finished, 1u);
   168 
   168 
   169     // The last worker signals to the coordinator that all work is completed.
   169     // The last worker signals to the coordinator that all work is completed.
   170     if (not_finished == 0) {
   170     if (not_finished == 0) {
   171       _end_semaphore->signal();
   171       _end_semaphore->signal();
   172     }
   172     }