gallium: add pipe_thread_setname

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
macos/master
Chia-I Wu 4 years ago
parent 49ea0562bd
commit 5c40b8d6a8
  1. 12
      src/gallium/auxiliary/os/os_thread.h

@ -46,6 +46,9 @@
#include <signal.h> #include <signal.h>
#endif #endif
#ifdef PIPE_OS_LINUX
#include <sys/prctl.h>
#endif
/* pipe_thread /* pipe_thread
*/ */
@ -85,6 +88,15 @@ static inline int pipe_thread_destroy( pipe_thread thread )
return thrd_detach( thread ); return thrd_detach( thread );
} }
static inline void pipe_thread_setname( const char *name )
{
#ifdef PIPE_OS_LINUX
prctl(PR_SET_NAME, name, 0, 0, 0);
#else
(void)name;
#endif
}
/* pipe_mutex /* pipe_mutex
*/ */

Loading…
Cancel
Save