mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-05 02:35:29 +02:00
Set threadnames on Android
This commit is contained in:
1 parent
4588eb8328
commit
758c614f0a
1 file changed
+11
@@ -9,6 +9,10 @@
|
||||
#include "base/logging.h"
|
||||
#include "thread/threadutil.h"
|
||||
|
||||
#ifdef ANDROID
|
||||
#include <pthread.h>
|
||||
#endif
|
||||
|
||||
#ifdef TLS_SUPPORTED
|
||||
static __THREAD const char *curThreadName;
|
||||
#endif
|
||||
@@ -38,6 +42,13 @@ void setCurrentThreadName(const char* threadName) {
|
||||
__except(EXCEPTION_CONTINUE_EXECUTION)
|
||||
{}
|
||||
#else
|
||||
|
||||
#if defined(ANDROID)
|
||||
pthread_setname_np(pthread_self(), threadName);
|
||||
// #else
|
||||
// pthread_setname_np(thread_name);
|
||||
#endif
|
||||
|
||||
// Do nothing
|
||||
#endif
|
||||
// Set the locally known threadname using a thread local variable.
|
||||
|
||||
Reference in new issue
Block a user