libs/vkd3d: Set names for internal threads.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Józef Kucia 2018-06-27 15:19:24 +02:00 committed by Alexandre Julliard
parent cc8c0135a1
commit 89a2dc46dd
4 changed files with 18 additions and 3 deletions

View File

@ -93,6 +93,8 @@ VKD3D_CHECK_FUNC([HAVE_BUILTIN_POPCOUNT], [__builtin_popcount], [__builtin_popco
VKD3D_CHECK_FUNC([HAVE_SYNC_ADD_AND_FETCH], [__sync_add_and_fetch], [__sync_add_and_fetch((int *)0, 0)])
VKD3D_CHECK_FUNC([HAVE_SYNC_SUB_AND_FETCH], [__sync_sub_and_fetch], [__sync_sub_and_fetch((int *)0, 0)])
VKD3D_CHECK_LIB_FUNCS([pthread_setname_np], [$PTHREAD_LIBS])
AM_CONDITIONAL([HAVE_WIDL], [test "x$WIDL" != "xno"])
AM_CONDITIONAL([HAVE_CROSSTARGET32], [test "x$CROSSTARGET32" != "xno"])
AM_CONDITIONAL([HAVE_CROSSTARGET64], [test "x$CROSSTARGET64" != "xno"])

View File

@ -199,6 +199,10 @@ static void *vkd3d_fence_worker_main(void *arg)
struct vkd3d_fence_worker *worker = arg;
int rc;
#ifdef HAVE_PTHREAD_SETNAME_NP
pthread_setname_np(pthread_self(), "vkd3d_worker");
#endif
for (;;)
{
if ((rc = pthread_mutex_lock(&worker->mutex)))

View File

@ -19,12 +19,14 @@
#ifndef __VKD3D_PRIVATE_H
#define __VKD3D_PRIVATE_H
#define VK_NO_PROTOTYPES
#define COBJMACROS
#define NONAMELESSUNION
#include "vkd3d.h"
#define VK_NO_PROTOTYPES
#include "vkd3d_common.h"
#include "vkd3d_memory.h"
#include "vkd3d.h"
#include "vkd3d_shader.h"
#include <assert.h>

View File

@ -7,3 +7,10 @@ AC_LINK_IFELSE([AC_LANG_SOURCE([int main(void) { return [$3]; }])],
[1],
[Define to 1 if you have $2.])],
[AC_MSG_RESULT([no])])])
dnl VKD3D_CHECK_LIB_FUNCS
AC_DEFUN([VKD3D_CHECK_LIB_FUNCS],
[vkd3d_libs_saved="$LIBS"
LIBS="$LIBS $2"
AC_CHECK_FUNCS([$1], [$3], [$4])
LIBS="$vkd3d_libs_saved"])