aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorJeroen van Rijn <Kelimion@users.noreply.github.com>2025-06-12 16:36:40 +0200
committerJeroen van Rijn <Kelimion@users.noreply.github.com>2025-06-12 16:36:40 +0200
commit5aa377e64e93f80a2ed3d2fabdea09a4e89c50b5 (patch)
tree62743d98038206169d7210b95f642d1eaa3d7e76 /core
parent59ba37f23266a5541002b4beb057837a207793f0 (diff)
Revert changes to thread_unix.odin
Diffstat (limited to 'core')
-rw-r--r--core/thread/thread_unix.odin9
1 files changed, 2 insertions, 7 deletions
diff --git a/core/thread/thread_unix.odin b/core/thread/thread_unix.odin
index da5929d1d..7be5103ae 100644
--- a/core/thread/thread_unix.odin
+++ b/core/thread/thread_unix.odin
@@ -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
}