src/hotspot/share/gc/shared/workgroup.cpp
changeset 51332 c25572739e7c
parent 48955 e22914003cf0
child 51546 b9f6a4427da9
equal deleted inserted replaced
51331:7939b3c4e408 51332:c25572739e7c
   185   volatile uint _num_workers;
   185   volatile uint _num_workers;
   186 
   186 
   187   Monitor* _monitor;
   187   Monitor* _monitor;
   188 
   188 
   189  public:
   189  public:
   190   MutexGangTaskDispatcher()
   190   MutexGangTaskDispatcher() :
   191       : _task(NULL),
   191     _task(NULL),
   192         _monitor(new Monitor(Monitor::leaf, "WorkGang dispatcher lock", false, Monitor::_safepoint_check_never)),
   192     _started(0),
   193         _started(0),
   193     _finished(0),
   194         _finished(0),
   194     _num_workers(0),
   195         _num_workers(0) {}
   195     _monitor(new Monitor(Monitor::leaf, "WorkGang dispatcher lock", false, Monitor::_safepoint_check_never)) {
       
   196   }
   196 
   197 
   197   ~MutexGangTaskDispatcher() {
   198   ~MutexGangTaskDispatcher() {
   198     delete _monitor;
   199     delete _monitor;
   199   }
   200   }
   200 
   201 
   406 }
   407 }
   407 
   408 
   408 // SubTasksDone functions.
   409 // SubTasksDone functions.
   409 
   410 
   410 SubTasksDone::SubTasksDone(uint n) :
   411 SubTasksDone::SubTasksDone(uint n) :
   411   _n_tasks(n), _tasks(NULL) {
   412   _tasks(NULL), _n_tasks(n), _threads_completed(0) {
   412   _tasks = NEW_C_HEAP_ARRAY(uint, n, mtInternal);
   413   _tasks = NEW_C_HEAP_ARRAY(uint, n, mtInternal);
   413   guarantee(_tasks != NULL, "alloc failure");
   414   guarantee(_tasks != NULL, "alloc failure");
   414   clear();
   415   clear();
   415 }
   416 }
   416 
   417