thread.name = name in unix

This commit is contained in:
PePerRoNii
2025-08-28 09:50:25 +07:00
parent 5ab3c1794e
commit e4cc58d992

View File

@@ -58,9 +58,7 @@ _create :: proc(procedure: Thread_Proc, priority: Thread_Priority, name: Maybe(s
runtime.run_thread_local_cleaners()
}
when ODIN_OS != .Haiku {
_set_name(t)
}
_set_name(t)
t.procedure(t)
}
@@ -130,6 +128,9 @@ _create :: proc(procedure: Thread_Proc, priority: Thread_Priority, name: Maybe(s
free(thread, thread.creation_allocator)
return nil
}
thread.name = name
return thread
}
@@ -246,4 +247,4 @@ _set_name :: proc(thread: ^Thread) {
pthread_setname_np(tid, raw_data(buf[:]))
}
}
}