Forráskód Böngészése

STATUS_WAKING_UP status is never assigned to a worker

Olivier Aumage 8 éve
szülő
commit
291472dcd0
2 módosított fájl, 3 hozzáadás és 7 törlés
  1. 1 3
      src/core/errorcheck.h
  2. 2 4
      src/drivers/driver_common/driver_common.c

+ 1 - 3
src/core/errorcheck.h

@@ -37,9 +37,7 @@ enum _starpu_worker_status
 	/* while executing the scheduler code */
 	STATUS_SCHEDULING,
 	/* while sleeping because there is nothing to do */
-	STATUS_SLEEPING,
-	/* while a sleeping worker is about to wake up (to avoid waking twice for the same worker) */
-	STATUS_WAKING_UP
+	STATUS_SLEEPING
 };
 
 struct _starpu_worker;

+ 2 - 4
src/drivers/driver_common/driver_common.c

@@ -302,9 +302,7 @@ static void _starpu_worker_set_status_scheduling_done(int workerid)
 
 static void _starpu_worker_set_status_sleeping(int workerid)
 {
-	if ( _starpu_worker_get_status(workerid) == STATUS_WAKING_UP)
-		_starpu_worker_set_status(workerid, STATUS_SLEEPING);
-	else if (_starpu_worker_get_status(workerid) != STATUS_SLEEPING)
+	if (_starpu_worker_get_status(workerid) != STATUS_SLEEPING)
 	{
 		_STARPU_TRACE_WORKER_SLEEP_START;
 		_starpu_worker_restart_sleeping(workerid);
@@ -315,7 +313,7 @@ static void _starpu_worker_set_status_sleeping(int workerid)
 
 static void _starpu_worker_set_status_wakeup(int workerid)
 {
-	if (_starpu_worker_get_status(workerid) == STATUS_SLEEPING || _starpu_worker_get_status(workerid) == STATUS_WAKING_UP)
+	if (_starpu_worker_get_status(workerid) == STATUS_SLEEPING)
 	{
 		_STARPU_TRACE_WORKER_SLEEP_END;
 		_starpu_worker_stop_sleeping(workerid);