From e14a891d53c272f791edb060bdf6dc38da112687 Mon Sep 17 00:00:00 2001 From: Christian Menard Date: Tue, 25 Jun 2024 15:36:40 +0200 Subject: [PATCH] Fixed initialization of the master worker thread id Fixes https://github.com/lf-lang/reactor-c/issues/452 --- core/threaded/reactor_threaded.c | 1 + 1 file changed, 1 insertion(+) diff --git a/core/threaded/reactor_threaded.c b/core/threaded/reactor_threaded.c index 392f49c31..14d84fd14 100644 --- a/core/threaded/reactor_threaded.c +++ b/core/threaded/reactor_threaded.c @@ -1112,6 +1112,7 @@ int lf_reactor_c_main(int argc, const char* argv[]) { // run on the main thread, rather than creating a new thread. // This is important for bare-metal platforms, who can't // afford to have the main thread sit idle. + env->thread_ids[j] = lf_thread_self(); continue; } if (lf_thread_create(&env->thread_ids[j], worker, env) != 0) {