mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-07 08:08:50 +00:00
Added thread name
Call pthread_setname_np with the correct number of arguments on NetBSD.
This commit is contained in:
+2
-4
@@ -626,14 +626,12 @@ gb_internal void thread_set_name(Thread *t, char const *name) {
|
|||||||
pthread_setname_np(name);
|
pthread_setname_np(name);
|
||||||
#elif defined(GB_SYSTEM_FREEBSD) || defined(GB_SYSTEM_OPENBSD)
|
#elif defined(GB_SYSTEM_FREEBSD) || defined(GB_SYSTEM_OPENBSD)
|
||||||
pthread_set_name_np(t->posix_handle, name);
|
pthread_set_name_np(t->posix_handle, name);
|
||||||
#else
|
#elif defined(GB_SYSTEM_NETBSD)
|
||||||
#ifdef GB_SYSTEM_NETBSD
|
pthread_setname_np(t->posix_handle, "%s", (void*)name);
|
||||||
// TODO(phix): Could be that libs are to old on NetBSD? Just ignore for now.
|
|
||||||
#else
|
#else
|
||||||
// TODO(bill): Test if this works
|
// TODO(bill): Test if this works
|
||||||
pthread_setname_np(t->posix_handle, name);
|
pthread_setname_np(t->posix_handle, name);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(GB_SYSTEM_LINUX)
|
#if defined(GB_SYSTEM_LINUX)
|
||||||
|
|||||||
Reference in New Issue
Block a user