summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorTim Mayberry <mojofunk@gmail.com>2015-03-12 22:15:41 +1000
committerTim Mayberry <mojofunk@gmail.com>2015-03-12 23:04:25 +1000
commit0f8da2d4cd5129378a3323689aaa219b3d98dd81 (patch)
tree6b1c97cd99a364aca51b832ff60f8e14101f32b5 /libs
parenta9c449c4af7f735cf38591ea0387fa1724ae5bb7 (diff)
Define DEBUG_THREAD_SELF when debug is enabled
Diffstat (limited to 'libs')
-rw-r--r--libs/pbd/pbd/debug.h12
1 files 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*/