|
@@ -350,8 +350,11 @@ static void _starpu_worker_set_status_sleeping(int workerid)
|
|
|
{
|
|
|
if (_starpu_worker_get_status(workerid) != STATUS_SLEEPING)
|
|
|
{
|
|
|
- _STARPU_TRACE_WORKER_SLEEP_START;
|
|
|
- _starpu_worker_restart_sleeping(workerid);
|
|
|
+ if (_starpu_worker_get_status(workerid) != STATUS_SLEEPING_SCHEDULING)
|
|
|
+ {
|
|
|
+ _STARPU_TRACE_WORKER_SLEEP_START;
|
|
|
+ _starpu_worker_restart_sleeping(workerid);
|
|
|
+ }
|
|
|
_starpu_worker_set_status(workerid, STATUS_SLEEPING);
|
|
|
}
|
|
|
|