From 3713be8b470b1ac0fcb4f1e4c6b79c526b2196db Mon Sep 17 00:00:00 2001 From: Ben Byer Date: Mon, 31 Mar 2008 16:30:16 -0700 Subject: [PATCH] add logging of current thread ID to DEBUG_LOG macro (cherry picked from commit 5848510cc5a8091b30230ab920d904ca6b159480) --- hw/xquartz/darwin.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/xquartz/darwin.h b/hw/xquartz/darwin.h index bd1b9a42a..9384b9dbb 100644 --- a/hw/xquartz/darwin.h +++ b/hw/xquartz/darwin.h @@ -125,7 +125,7 @@ enum { #ifdef ENABLE_DEBUG_LOG extern FILE *debug_log_fp; #define DEBUG_LOG_NAME "x11-debug.txt" -#define DEBUG_LOG(msg, args...) if (debug_log_fp) fprintf(debug_log_fp, "%s:%s:%d " msg, __FILE__, __FUNCTION__, __LINE__, ##args ); fflush(debug_log_fp); +#define DEBUG_LOG(msg, args...) if (debug_log_fp) fprintf(debug_log_fp, "%x:%s:%s:%d " msg, pthread_self(), __FILE__, __FUNCTION__, __LINE__, ##args ); fflush(debug_log_fp); #else #define DEBUG_LOG(msg, args...) #endif