|
@@ -227,21 +227,20 @@ static int prio_can_push(struct starpu_sched_component * component)
|
|
|
|
|
|
STARPU_ASSERT(component->nchildren == 1);
|
|
|
struct starpu_sched_component * child = component->children[0];
|
|
|
+ struct starpu_task * task;
|
|
|
|
|
|
- struct starpu_task * task = starpu_sched_component_pull_task(component, component);
|
|
|
- if(task)
|
|
|
- ret = starpu_sched_component_push_task(component,child,task);
|
|
|
- while(task && !ret)
|
|
|
+ while (1)
|
|
|
{
|
|
|
- if(!res)
|
|
|
- res = 1;
|
|
|
-
|
|
|
task = starpu_sched_component_pull_task(component,component);
|
|
|
- if(task)
|
|
|
- ret = starpu_sched_component_push_task(component,child,task);
|
|
|
+ if (!task)
|
|
|
+ break;
|
|
|
+ ret = starpu_sched_component_push_task(component,child,task);
|
|
|
+ if (ret)
|
|
|
+ break;
|
|
|
+ res = 1;
|
|
|
}
|
|
|
if(task && ret)
|
|
|
- prio_push_local_task(component,task,1);
|
|
|
+ prio_push_local_task(component,task,1);
|
|
|
|
|
|
return res;
|
|
|
}
|