From 4a8e5b1de2571493e016e2a2fa71fd62894e78d0 Mon Sep 17 00:00:00 2001 From: Brendan Hansen Date: Sat, 9 Dec 2023 22:08:28 -0600 Subject: [PATCH] fixed: #58 by adding `_initialize` export --- core/runtime/common.onyx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/core/runtime/common.onyx b/core/runtime/common.onyx index 498fdb9a..471b0a38 100644 --- a/core/runtime/common.onyx +++ b/core/runtime/common.onyx @@ -9,6 +9,14 @@ use runtime.platform { __output_string } // Every platform should define this, even if is it just '() {}'. #export "_start" platform.__start +// +// Export a common initialization procedure that should +// always be invoked before using anything in Onyx. +#export "_initialize" () { + __runtime_initialize(); + context.thread_id = 0; +} + #local __output_uint :: (n: u64) { buf: [128] u8; -- 2.25.1