diff options
Diffstat (limited to 'os')
-rw-r--r-- | os/inputthread.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/os/inputthread.c b/os/inputthread.c index 6b379f5ea..6aa0a9ce6 100644 --- a/os/inputthread.c +++ b/os/inputthread.c @@ -310,6 +310,12 @@ InputThreadDoWork(void *arg) inputThreadInfo->running = TRUE; +#if defined(HAVE_PTHREAD_SETNAME_NP_WITH_TID) + pthread_setname_np (pthread_self(), "InputThread"); +#elif defined(HAVE_PTHREAD_SETNAME_NP_WITHOUT_TID) + pthread_setname_np ("InputThread"); +#endif + ospoll_add(inputThreadInfo->fds, hotplugPipeRead, ospoll_trigger_level, InputThreadPipeNotify, @@ -422,6 +428,12 @@ InputThreadPreInit(void) } hotplugPipeWrite = hotplugPipe[1]; +#if defined(HAVE_PTHREAD_SETNAME_NP_WITH_TID) + pthread_setname_np (pthread_self(), "MainThread"); +#elif defined(HAVE_PTHREAD_SETNAME_NP_WITHOUT_TID) + pthread_setname_np ("MainThread"); +#endif + } /** |