Add runtime.exit

This commit is contained in:
gingerBill
2025-10-30 16:29:23 +00:00
parent 816c47058d
commit efb553afad
10 changed files with 73 additions and 0 deletions
+10
View File
@@ -26,3 +26,13 @@ _stderr_write :: proc "contextless" (data: []byte) -> (int, _OS_Errno) {
return 0, _OS_Errno(__error()^)
}
}
foreign import libc "system:System"
_exit :: proc "contextless" (code: int) -> ! {
@(default_calling_convention="c")
foreign libc {
exit :: proc(status: i32) -> ! ---
}
exit(i32(code))
}