Skip to content
Snippets Groups Projects

vkd3d: Print the thread id in trace messages.

Merged Conor McCarthy requested to merge cmccarthy/vkd3d:thread_id into master
2 unresolved threads
Files
2
+ 7
0
@@ -31,6 +31,7 @@
#include <stdlib.h>
#include <stdbool.h>
#include <string.h>
#include <unistd.h>
#ifdef HAVE_PTHREAD_H
#include <pthread.h>
#endif
@@ -105,7 +106,13 @@ void vkd3d_dbg_printf(enum vkd3d_dbg_level level, const char *function, const ch
assert(level < ARRAY_SIZE(debug_level_names));
#ifdef _WIN32
vkd3d_dbg_output("vkd3d:%04lx:%s:%s ", GetCurrentThreadId(), debug_level_names[level], function);
#elif HAVE_GETTID
vkd3d_dbg_output("vkd3d:%u:%s:%s ", gettid(), debug_level_names[level], function);
#else
vkd3d_dbg_output("vkd3d:%s:%s ", debug_level_names[level], function);
#endif
va_start(args, fmt);
vkd3d_dbg_voutput(fmt, args);
va_end(args);
Loading