mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-22 11:20:11 +01:00
gallium/util: replace pipe_thread_setname() with u_thread_setname()
They do the same thing we just moved the function to be accessible to all of Mesa. Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
parent
14e6b86952
commit
ca76a2ba1b
3 changed files with 3 additions and 15 deletions
|
|
@ -42,18 +42,6 @@
|
||||||
#include "util/u_thread.h"
|
#include "util/u_thread.h"
|
||||||
|
|
||||||
|
|
||||||
static inline void pipe_thread_setname( const char *name )
|
|
||||||
{
|
|
||||||
#if defined(HAVE_PTHREAD)
|
|
||||||
# if defined(__GNU_LIBRARY__) && defined(__GLIBC__) && defined(__GLIBC_MINOR__) && \
|
|
||||||
(__GLIBC__ >= 3 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 12))
|
|
||||||
pthread_setname_np(pthread_self(), name);
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
(void)name;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static inline int pipe_thread_is_self( thrd_t thread )
|
static inline int pipe_thread_is_self( thrd_t thread )
|
||||||
{
|
{
|
||||||
#if defined(HAVE_PTHREAD)
|
#if defined(HAVE_PTHREAD)
|
||||||
|
|
|
||||||
|
|
@ -791,7 +791,7 @@ thread_function(void *init_data)
|
||||||
unsigned fpstate;
|
unsigned fpstate;
|
||||||
|
|
||||||
util_snprintf(thread_name, sizeof thread_name, "llvmpipe-%u", task->thread_index);
|
util_snprintf(thread_name, sizeof thread_name, "llvmpipe-%u", task->thread_index);
|
||||||
pipe_thread_setname(thread_name);
|
u_thread_setname(thread_name);
|
||||||
|
|
||||||
/* Make sure that denorms are treated like zeros. This is
|
/* Make sure that denorms are treated like zeros. This is
|
||||||
* the behavior required by D3D10. OpenGL doesn't care.
|
* the behavior required by D3D10. OpenGL doesn't care.
|
||||||
|
|
|
||||||
|
|
@ -95,7 +95,7 @@ nine_csmt_worker(void *arg)
|
||||||
struct csmt_instruction *instr;
|
struct csmt_instruction *instr;
|
||||||
DBG("CSMT worker spawned\n");
|
DBG("CSMT worker spawned\n");
|
||||||
|
|
||||||
pipe_thread_setname("CSMT-Worker");
|
u_thread_setname("CSMT-Worker");
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
nine_queue_wait_flush(ctx->pool);
|
nine_queue_wait_flush(ctx->pool);
|
||||||
|
|
@ -158,7 +158,7 @@ nine_csmt_create( struct NineDevice9 *This )
|
||||||
(void) mtx_init(&ctx->thread_resume, mtx_plain);
|
(void) mtx_init(&ctx->thread_resume, mtx_plain);
|
||||||
|
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
pipe_thread_setname("Main thread");
|
u_thread_setname("Main thread");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ctx->device = This;
|
ctx->device = This;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue