@@ -1,6 +1,7 @@
package odin_libc
import "core:time"
+import "core:thread"
Clock :: enum i32 {
Monotonic = 1,
@@ -26,5 +27,9 @@ clock_gettine :: proc "c" (clockid: Clock, tp: ^Time_Spec) -> i32 {
@(require, linkage="strong", link_name="sched_yield")
sched_yield :: proc "c" () -> i32 {
+ when thread.IS_SUPPORTED {
+ context = g_ctx
+ thread.yield()
+ }
return 0
}