diff options
| author | Andreas T Jonsson <mail@andreasjonsson.se> | 2024-04-17 09:42:41 +0200 |
|---|---|---|
| committer | Andreas T Jonsson <mail@andreasjonsson.se> | 2024-04-17 09:42:41 +0200 |
| commit | 80067a959b51d4bda4aaf96677ca1d2e4831323d (patch) | |
| tree | 3bbbe0f75f44baf8668f018148bcfae7dbcf1030 /src/threading.cpp | |
| parent | 4558f3992a47b4597563152baf26f1d2b5684b4d (diff) | |
Added thread name
Call pthread_setname_np with the correct number of arguments on NetBSD.
Diffstat (limited to 'src/threading.cpp')
| -rw-r--r-- | src/threading.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/threading.cpp b/src/threading.cpp index 77aa8edf7..79ed8e8a4 100644 --- a/src/threading.cpp +++ b/src/threading.cpp @@ -626,13 +626,11 @@ gb_internal void thread_set_name(Thread *t, char const *name) { pthread_setname_np(name); #elif defined(GB_SYSTEM_FREEBSD) || defined(GB_SYSTEM_OPENBSD) pthread_set_name_np(t->posix_handle, name); +#elif defined(GB_SYSTEM_NETBSD) + pthread_setname_np(t->posix_handle, "%s", (void*)name); #else - #ifdef GB_SYSTEM_NETBSD - // TODO(phix): Could be that libs are to old on NetBSD? Just ignore for now. - #else - // TODO(bill): Test if this works - pthread_setname_np(t->posix_handle, name); - #endif + // TODO(bill): Test if this works + pthread_setname_np(t->posix_handle, name); #endif } |