mirror of
https://github.com/odin-lang/Odin.git
synced 2026-06-04 17:54:39 +00:00
18 lines
476 B
Odin
18 lines
476 B
Odin
//+build !freestanding
|
|
//+build !windows
|
|
package runtime
|
|
|
|
import "core:os"
|
|
|
|
// TODO(bill): reimplement `os.write` so that it does not rely on package os
|
|
// NOTE: Use os_specific_linux.odin, os_specific_darwin.odin, etc
|
|
os_write :: proc "contextless" (data: []byte) -> (int, _OS_Errno) {
|
|
context = default_context();
|
|
n, err := os.write(os.stderr, data);
|
|
return int(n), _OS_Errno(err);
|
|
}
|
|
|
|
current_thread_id :: proc "contextless" () -> int {
|
|
return os.current_thread_id();
|
|
}
|