Explorar o código

add an assert on _starpu_sched_post_exec_hook

Olivier Aumage %!s(int64=8) %!d(string=hai) anos
pai
achega
770a8a1b0b
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  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)
 {
+	STARPU_ASSERT(task->cl != NULL);
 	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);
 	if (sched_ctx->sched_policy && sched_ctx->sched_policy->post_exec_hook)