瀏覽代碼

Avoid passing bogus values from modular schedulers to the rest of StarPU

Samuel Thibault 6 年之前
父節點
當前提交
dbed3a64a9
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      src/sched_policies/component_sched.c

+ 4 - 1
src/sched_policies/component_sched.c

@@ -338,7 +338,10 @@ int starpu_sched_tree_push_task(struct starpu_task * task)
 
 	int ret_val = starpu_sched_component_push_task(NULL, tree->root,task);
 
-	return ret_val;
+	/* Modular schedulers are not supposed to refuse tasks */
+	STARPU_ASSERT(!ret_val);
+
+	return 0;
 }
 
 int starpu_sched_component_push_task(struct starpu_sched_component *from STARPU_ATTRIBUTE_UNUSED, struct starpu_sched_component *to, struct starpu_task *task)