Skip to content

Commit

Permalink
fix interrupts with user sched
Browse files Browse the repository at this point in the history
  • Loading branch information
yamt committed Jun 18, 2023
1 parent 87b11ca commit b1b7862
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/usched.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -79,6 +79,7 @@ sched_run(struct sched *sched, struct exec_context *caller)
if (ctx == caller) {
break;
}
assert(ret != ETOYWASMUSERINTERRUPT);
ctx->exec_done(ctx);
}
}
Expand Down

0 comments on commit b1b7862

Please sign in to comment.