瀏覽代碼

add an assert on _starpu_sched_post_exec_hook

Olivier Aumage 8 年之前
父節點
當前提交
770a8a1b0b
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      src/core/sched_policy.c

+ 1 - 0
src/core/sched_policy.c

@@ -1073,6 +1073,7 @@ void _starpu_sched_pre_exec_hook(struct starpu_task *task)
 
 
 void _starpu_sched_post_exec_hook(struct starpu_task *task)
 void _starpu_sched_post_exec_hook(struct starpu_task *task)
 {
 {
+	STARPU_ASSERT(task->cl != NULL);
 	unsigned sched_ctx_id = starpu_sched_ctx_get_ctx_for_task(task);
 	unsigned sched_ctx_id = starpu_sched_ctx_get_ctx_for_task(task);
 	struct _starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_struct(sched_ctx_id);
 	struct _starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_struct(sched_ctx_id);
 	if (sched_ctx->sched_policy && sched_ctx->sched_policy->post_exec_hook)
 	if (sched_ctx->sched_policy && sched_ctx->sched_policy->post_exec_hook)