From 19fd4155ac07196e17a30ef0b3119815ca21915d Mon Sep 17 00:00:00 2001 From: Nick Gasson Date: Fri, 23 Feb 2024 14:27:06 +0000 Subject: [PATCH] Schedule initial process execution in reset_process --- src/jit/jit-irgen.c | 6 ------ src/rt/model.c | 3 +++ 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/jit/jit-irgen.c b/src/jit/jit-irgen.c index 95db9080..0f0812a3 100644 --- a/src/jit/jit-irgen.c +++ b/src/jit/jit-irgen.c @@ -4211,12 +4211,6 @@ void jit_irgen(jit_func_t *f) j_jump(g, JIT_CC_F, g->blocks[1]); } - if (kind == VCODE_UNIT_PROCESS) { - // Schedule the process to run immediately - j_send(g, 0, jit_value_from_int64(0)); - macro_exit(g, JIT_EXIT_SCHED_PROCESS); - } - if (g->statereg.kind != JIT_VALUE_INVALID) { // Stash context pointer jit_value_t context = has_params ? g->map[0] : j_recv(g, first_param); diff --git a/src/rt/model.c b/src/rt/model.c index 574dce2a..4f585f35 100644 --- a/src/rt/model.c +++ b/src/rt/model.c @@ -927,6 +927,9 @@ static void reset_process(rt_model_t *m, rt_proc_t *proc) thread->active_obj = NULL; thread->active_scope = NULL; + + // Schedule the process to run immediately + deltaq_insert_proc(m, 0, proc); } static void reset_property(rt_model_t *m, rt_prop_t *prop) -- 2.39.2