mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-02 12:48:14 +00:00
Add runtime.exit
This commit is contained in:
@@ -24,3 +24,14 @@ _stderr_write :: proc "contextless" (data: []byte) -> (int, _OS_Errno) {
|
||||
}
|
||||
return int(ret), 0
|
||||
}
|
||||
|
||||
|
||||
foreign import libc "system:c"
|
||||
|
||||
_exit :: proc "contextless" (code: int) -> ! {
|
||||
@(default_calling_convention="c")
|
||||
foreign libc {
|
||||
exit :: proc(status: i32) -> ! ---
|
||||
}
|
||||
exit(i32(code))
|
||||
}
|
||||
Reference in New Issue
Block a user