|
@@ -1113,9 +1113,10 @@ static void _starpu_delete_sched_ctx(struct _starpu_sched_ctx *sched_ctx)
|
|
|
void starpu_sched_ctx_delete(unsigned sched_ctx_id)
|
|
|
{
|
|
|
struct _starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_struct(sched_ctx_id);
|
|
|
+ STARPU_ASSERT(sched_ctx);
|
|
|
+
|
|
|
#ifdef STARPU_USE_SC_HYPERVISOR
|
|
|
- if(sched_ctx != NULL && sched_ctx_id != 0 && sched_ctx_id != STARPU_NMAX_SCHED_CTXS
|
|
|
- && sched_ctx->perf_counters != NULL)
|
|
|
+ if (sched_ctx_id != 0 && sched_ctx_id != STARPU_NMAX_SCHED_CTXS && sched_ctx->perf_counters != NULL)
|
|
|
{
|
|
|
_STARPU_TRACE_HYPERVISOR_BEGIN();
|
|
|
sched_ctx->perf_counters->notify_delete_context(sched_ctx_id);
|