mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-15 10:40:01 +01:00
Core: Set thread names when possible.
This doesn't seem to be working for lldb, though.
This commit is contained in:
1 parent
95bcda409d
commit
062566b67c
2 files changed
+8
-3
No files matched your search
@@ -12,7 +12,7 @@
|
||||
#include "base/logging.h"
|
||||
#include "thread/threadutil.h"
|
||||
|
||||
#ifdef __ANDROID__
|
||||
#if defined(__ANDROID__) || defined(__APPLE__) || (defined(__GLIBC__) && defined(_GNU_SOURCE))
|
||||
#include <pthread.h>
|
||||
#endif
|
||||
|
||||
@@ -96,10 +96,12 @@ void setCurrentThreadName(const char* threadName) {
|
||||
{}
|
||||
#else
|
||||
|
||||
#if defined(__ANDROID__)
|
||||
#if defined(__ANDROID__) || (defined(__GLIBC__) && defined(_GNU_SOURCE))
|
||||
pthread_setname_np(pthread_self(), threadName);
|
||||
#elif defined(__APPLE__)
|
||||
pthread_setname_np(threadName);
|
||||
// #else
|
||||
// pthread_setname_np(thread_name);
|
||||
// pthread_setname_np(threadName);
|
||||
#endif
|
||||
|
||||
// Do nothing
|
||||
|
||||
Reference in new issue
Block a user