mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-04 14:48:47 +00:00
Add runtime.exit
This commit is contained in:
@@ -23,6 +23,9 @@ foreign wasi {
|
||||
argv: [^]cstring,
|
||||
argv_buf: [^]byte,
|
||||
) -> u16 ---
|
||||
|
||||
@(private="file")
|
||||
proc_exit :: proc(rval: u32) -> ! ---
|
||||
}
|
||||
|
||||
_stderr_write :: proc "contextless" (data: []byte) -> (int, _OS_Errno) {
|
||||
@@ -53,3 +56,8 @@ _wasi_setup_args :: proc() {
|
||||
delete(args_buf)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
_exit :: proc "contextless" (code: int) -> ! {
|
||||
proc_exit(u32(code))
|
||||
}
|
||||
Reference in New Issue
Block a user