diff options
author | Jeremy Huddleston <jeremyhu@freedesktop.org> | 2008-04-17 13:12:56 -0700 |
---|---|---|
committer | Jeremy Huddleston <jeremyhu@freedesktop.org> | 2008-04-17 13:21:02 -0700 |
commit | dbd4c031565d269fef90af23386ff045ec78688c (patch) | |
tree | cb33694f47f1e6c95c06d5dd1c64ab6a7cfe0461 /hw/xquartz/darwin.h | |
parent | fa0645b452cbebd1800a63f1c95cb77fef4ab211 (diff) |
XQuartz: Added framework for asserting which thread we're in.
(cherry picked from commit 00beb982510e7a82d77e1f1d43e77c84d7bf74c2)
Diffstat (limited to 'hw/xquartz/darwin.h')
-rw-r--r-- | hw/xquartz/darwin.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/xquartz/darwin.h b/hw/xquartz/darwin.h index df92d8b49..3231077be 100644 --- a/hw/xquartz/darwin.h +++ b/hw/xquartz/darwin.h @@ -34,6 +34,8 @@ #include <X11/extensions/XKB.h> #include <assert.h> +#include "threadSafety.h" + typedef struct { void *framebuffer; int x; @@ -123,7 +125,7 @@ void DarwinSendDDXEvent(int type, int argc, ...); #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, "%x:%s:%s:%d " msg, pthread_self(), __FILE__, __FUNCTION__, __LINE__, ##args ); fflush(debug_log_fp); +#define DEBUG_LOG(msg, args...) if (debug_log_fp) fprintf(debug_log_fp, "%s:%s:%s:%d " msg, threadSafetyID(pthread_self()), __FILE__, __FUNCTION__, __LINE__, ##args ); fflush(debug_log_fp); #else #define DEBUG_LOG(msg, args...) #endif |