From b1b7862d85b21c11bde1a319fa896457df821069 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Takashi Date: Sun, 18 Jun 2023 11:44:39 +0900 Subject: [PATCH] fix interrupts with user sched --- lib/usched.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/usched.c b/lib/usched.c index adab265a..1739d1d9 100644 --- a/lib/usched.c +++ b/lib/usched.c @@ -68,7 +68,7 @@ sched_run(struct sched *sched, struct exec_context *caller) * calling sched_enqueue. */ ret = instance_execute_continue(ctx); - if (IS_RESTARTABLE(ret)) { + if (IS_RESTARTABLE(ret) && ret != ETOYWASMUSERINTERRUPT) { xlog_trace("%s: re-enqueueing ctx %p", __func__, (void *)ctx); LIST_INSERT_TAIL(q, ctx, rq); @@ -79,6 +79,7 @@ sched_run(struct sched *sched, struct exec_context *caller) if (ctx == caller) { break; } + assert(ret != ETOYWASMUSERINTERRUPT); ctx->exec_done(ctx); } }