mesa: set thread name for glthread
authorMiklós Máté <mtmkls@gmail.com>
Sat, 18 Mar 2017 21:55:43 +0000 (22:55 +0100)
committerTimothy Arceri <tarceri@itsqueeze.com>
Thu, 23 Mar 2017 23:00:19 +0000 (10:00 +1100)
Signed-off-by: Miklós Máté <mtmkls@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/mesa/main/glthread.c

index 623266f484b9642b6f1d7739d3d06c029177f883..06115b916db361a53347b672c9ae1d93601dd4d3 100644 (file)
@@ -36,6 +36,7 @@
 #include "main/glthread.h"
 #include "main/marshal.h"
 #include "main/marshal_generated.h"
+#include "util/u_thread.h"
 
 #ifdef HAVE_PTHREAD
 
@@ -75,6 +76,8 @@ glthread_worker(void *data)
    ctx->Driver.SetBackgroundContext(ctx);
    _glapi_set_context(ctx);
 
+   u_thread_setname("mesa_glthread");
+
    pthread_mutex_lock(&glthread->mutex);
 
    while (true) {