debugging current thread id on apple too
This commit is contained in:
parent
011b2cecf2
commit
eb5bb253f3
@ -40,7 +40,7 @@
|
|||||||
# include <windows.h>
|
# include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (defined(__linux__) && defined(__GLIBC__) && defined(__GLIBC_MINOR__)) || defined(__NetBSD__)
|
#if (defined(__linux__) && defined(__GLIBC__) && defined(__GLIBC_MINOR__)) || defined(__NetBSD__) || defined(__APPLE__)
|
||||||
# include <pthread.h>
|
# include <pthread.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -104,6 +104,8 @@ namespace VS
|
|||||||
pthread_setname_np(pthread_self(), "%s", const_cast<char *>(name));
|
pthread_setname_np(pthread_self(), "%s", const_cast<char *>(name));
|
||||||
#elif defined(__OpenBSD__)
|
#elif defined(__OpenBSD__)
|
||||||
pthread_set_name_np(pthread_self(), const_cast<char *>(name));
|
pthread_set_name_np(pthread_self(), const_cast<char *>(name));
|
||||||
|
#elif defined(__APPLE__)
|
||||||
|
pthread_setname_np(name);
|
||||||
#elif defined(__HAIKU__)
|
#elif defined(__HAIKU__)
|
||||||
rename_thread(find_thread(nullptr), name);
|
rename_thread(find_thread(nullptr), name);
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user