浏览代码

Add explicit context to thread_unix.odin

gingerBill 5 年之前
父节点
当前提交
218c1599b1
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      core/thread/thread_unix.odin

+ 2 - 0
core/thread/thread_unix.odin

@@ -43,6 +43,8 @@ Thread_Priority :: enum {
 //
 create :: proc(procedure: Thread_Proc, priority := Thread_Priority.Normal) -> ^Thread {
 	__linux_thread_entry_proc :: proc "c" (t: rawptr) -> rawptr {
+		context = runtime.default_context();
+
 		t := (^Thread)(t);
 		sync.condition_wait_for(&t.start_gate);
 		sync.condition_destroy(&t.start_gate);