From 0f8da2d4cd5129378a3323689aaa219b3d98dd81 Mon Sep 17 00:00:00 2001 From: Tim Mayberry Date: Thu, 12 Mar 2015 22:15:41 +1000 Subject: [PATCH] Define DEBUG_THREAD_SELF when debug is enabled --- libs/pbd/pbd/debug.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libs/pbd/pbd/debug.h b/libs/pbd/pbd/debug.h index 306e381fc4..fdfffda71c 100644 --- a/libs/pbd/pbd/debug.h +++ b/libs/pbd/pbd/debug.h @@ -57,7 +57,11 @@ namespace PBD { #define DEBUG_STR(id) __debug_str ## id #define DEBUG_STR_APPEND(id,s) __debug_str ## id << s; #define DEBUG_ENABLED(bits) ((bits) & PBD::debug_bits) -#define DEBUG_THREAD_SELF 0 +#ifdef PLATFORM_WINDOWS +#define DEBUG_THREAD_SELF pthread_self().p +#else +#define DEBUG_THREAD_SELF pthread_self() +#endif #define DEBUG_TIMING_START(bits,td) if ((bits) & PBD::debug_bits) { td.start_timing (); } #define DEBUG_TIMING_ADD_ELAPSED(bits,td) if ((bits) & PBD::debug_bits) { td.add_elapsed (); } @@ -68,11 +72,7 @@ namespace PBD { #define DEBUG_STR(a) /* empty */ #define DEBUG_STR_APPEND(a,b) /* empty */ #define DEBUG_ENABLED(b) (0) -#ifdef PLATFORM_WINDOWS -#define DEBUG_THREAD_SELF pthread_self().p -#else -#define DEBUG_THREAD_SELF pthread_self() -#endif +#define DEBUG_THREAD_SELF 0 #define DEBUG_TIMING_START(bits,td) /*empty*/ #define DEBUG_TIMING_ADD_ELAPSED(bits,td) /*empty*/