add DEBUG_THREAD_SELF to allow use of DEBUG_TRACE with thread IDs on both normal pthreads platforms and PTW32

This commit is contained in:
Paul Davis 2014-12-10 09:32:25 -05:00
parent 2bbef1f32e
commit c06c15596b
2 changed files with 17 additions and 12 deletions

View file

@ -55,12 +55,17 @@ 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
#else
#define DEBUG_TRACE(bits,fmt,...) /*empty*/
#define DEBUG_STR(a) /* empty */
#define DEBUG_STR_APPEND(a,b) /* empty */
#define DEBUG_ENABLED(b) (0)
#ifdef PTW32_VERSION
#define DEBUG_THREAD_SELF pthread_self().p
#else
#define DEBUG_THREAD_SELF pthread_self()
#endif
#endif
#endif /* __libpbd_debug_h__ */