mirror of
https://github.com/odin-lang/Odin.git
synced 2025-12-28 17:04:34 +00:00
Revert changes to thread_unix.odin
This commit is contained in:
@@ -27,6 +27,8 @@ _create :: proc(procedure: Thread_Proc, priority: Thread_Priority) -> ^Thread {
|
||||
// most of the time, don't ask me why.
|
||||
can_set_thread_cancel_state := posix.pthread_setcancelstate(.DISABLE when ODIN_OS == .Darwin else .ENABLE, nil) == nil
|
||||
|
||||
t.id = sync.current_thread_id()
|
||||
|
||||
if .Started not_in sync.atomic_load(&t.flags) {
|
||||
sync.wait(&t.start_ok)
|
||||
}
|
||||
@@ -122,13 +124,6 @@ _create :: proc(procedure: Thread_Proc, priority: Thread_Priority) -> ^Thread {
|
||||
free(thread, thread.creation_allocator)
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
when size_of(posix.pthread_t) == size_of(i64) {
|
||||
thread.id = int((^i64)(&thread.unix_thread)^)
|
||||
} else {
|
||||
thread.id = int((^i32)(&thread.unix_thread)^)
|
||||
}
|
||||
return thread
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user