Files
Odin/core/runtime/defaults.odin
T
gingerBill f48a873954 Reorganize package runtime
Separates out the OS specific stuff into different files
2020-09-15 11:52:19 +01:00

22 lines
454 B
Odin

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();
}