From: Brendan Hansen Date: Sun, 10 Dec 2023 04:08:28 +0000 (-0600) Subject: fixed: #58 by adding `_initialize` export X-Git-Url: https://git.brendanfh.com/?a=commitdiff_plain;h=4a8e5b1de2571493e016e2a2fa71fd62894e78d0;p=onyx.git fixed: #58 by adding `_initialize` export --- 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;