mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-02 12:48:14 +00:00
Reorganize package runtime
Separates out the OS specific stuff into different files
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
package runtime
|
||||
|
||||
import "core:os"
|
||||
|
||||
current_thread_id :: proc "contextless" () -> int {
|
||||
return os.current_thread_id();
|
||||
}
|
||||
|
||||
default_assertion_failure_proc :: proc(prefix, message: string, loc: Source_Code_Location) {
|
||||
fd := os.stderr;
|
||||
print_caller_location(fd, loc);
|
||||
os.write_string(fd, " ");
|
||||
os.write_string(fd, prefix);
|
||||
if len(message) > 0 {
|
||||
os.write_string(fd, ": ");
|
||||
os.write_string(fd, message);
|
||||
}
|
||||
os.write_byte(fd, '\n');
|
||||
debug_trap();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user