mirror of
https://github.com/odin-lang/Odin.git
synced 2026-08-01 11:48:54 +00:00
thread.name = name in unix
This commit is contained in:
@@ -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[:]))
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user