Codechange: [OSX] Try to set the thread name for debugger display.

This commit is contained in:
Michael Lutz
2018-01-28 23:45:02 +01:00
parent 4971678f52
commit f670277ff5
3 changed files with 28 additions and 0 deletions

View File

@@ -14,6 +14,10 @@
#include <pthread.h>
#include <errno.h>
#if defined(__APPLE__)
#include "../os/macosx/macos.h"
#endif
#include "../safeguards.h"
/**
@@ -69,6 +73,9 @@ private:
pthread_setname_np(pthread_self(), self->name);
}
#endif
#endif
#if defined(__APPLE__)
MacOSSetThreadName(self->name);
#endif
self->ThreadProc();
pthread_exit(NULL);