Add explicit context to thread_unix.odin
This commit is contained in:
1 parent
9b2eecb3df
commit
218c1599b1
1 file changed
+2
@@ -43,6 +43,8 @@ Thread_Priority :: enum {
|
|||||||
//
|
//
|
||||||
create :: proc(procedure: Thread_Proc, priority := Thread_Priority.Normal) -> ^Thread {
|
create :: proc(procedure: Thread_Proc, priority := Thread_Priority.Normal) -> ^Thread {
|
||||||
__linux_thread_entry_proc :: proc "c" (t: rawptr) -> rawptr {
|
__linux_thread_entry_proc :: proc "c" (t: rawptr) -> rawptr {
|
||||||
|
context = runtime.default_context();
|
||||||
|
|
||||||
t := (^Thread)(t);
|
t := (^Thread)(t);
|
||||||
sync.condition_wait_for(&t.start_gate);
|
sync.condition_wait_for(&t.start_gate);
|
||||||
sync.condition_destroy(&t.start_gate);
|
sync.condition_destroy(&t.start_gate);
|
||||||
|
|||||||
Reference in new issue
Block a user