summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2017-03-09 10:07:43 +1100
committerTimothy Arceri <[email protected]>2017-03-12 17:49:04 +1100
commitca76a2ba1b83ca837a198dc58ef3962d1ca71c68 (patch)
tree7e2f9235cfd8f5f42ab7be205e764fbae582816a /src/gallium
parent14e6b8695206dc2b3f38c65ae5fab0e1819e2725 (diff)
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 <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/auxiliary/os/os_thread.h12
-rw-r--r--src/gallium/drivers/llvmpipe/lp_rast.c2
-rw-r--r--src/gallium/state_trackers/nine/nine_state.c4
3 files changed, 3 insertions, 15 deletions
diff --git a/src/gallium/auxiliary/os/os_thread.h b/src/gallium/auxiliary/os/os_thread.h
index ecd8f8a5e97..b6e0698da61 100644
--- a/src/gallium/auxiliary/os/os_thread.h
+++ b/src/gallium/auxiliary/os/os_thread.h
@@ -42,18 +42,6 @@
#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 )
{
#if defined(HAVE_PTHREAD)
diff --git a/src/gallium/drivers/llvmpipe/lp_rast.c b/src/gallium/drivers/llvmpipe/lp_rast.c
index d746778e25f..b25ade3d2ec 100644
--- a/src/gallium/drivers/llvmpipe/lp_rast.c
+++ b/src/gallium/drivers/llvmpipe/lp_rast.c
@@ -791,7 +791,7 @@ thread_function(void *init_data)
unsigned fpstate;
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
* the behavior required by D3D10. OpenGL doesn't care.
diff --git a/src/gallium/state_trackers/nine/nine_state.c b/src/gallium/state_trackers/nine/nine_state.c
index ef33942a62a..26c21f29f72 100644
--- a/src/gallium/state_trackers/nine/nine_state.c
+++ b/src/gallium/state_trackers/nine/nine_state.c
@@ -95,7 +95,7 @@ nine_csmt_worker(void *arg)
struct csmt_instruction *instr;
DBG("CSMT worker spawned\n");
- pipe_thread_setname("CSMT-Worker");
+ u_thread_setname("CSMT-Worker");
while (1) {
nine_queue_wait_flush(ctx->pool);
@@ -158,7 +158,7 @@ nine_csmt_create( struct NineDevice9 *This )
(void) mtx_init(&ctx->thread_resume, mtx_plain);
#if DEBUG
- pipe_thread_setname("Main thread");
+ u_thread_setname("Main thread");
#endif
ctx->device = This;