1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- #ifndef _PT_DEBUG_H
- #define _PT_DEBUG_H
- #include <features.h>
- #ifdef __DODEBUG_PT__
- # define DEBUG_PT
- #endif
- #define DO_ASSERT
- #undef PDEBUG
- #ifdef DEBUG_PT
- # define PDEBUG(fmt, args...) __pthread_message("%s: " fmt, __FUNCTION__, ## args)
- #else
- # define PDEBUG(fmt, args...)
- #endif
- #undef PDEBUGG
- #define PDEBUGG(fmt, args...)
- #undef ASSERT
- #ifdef DO_ASSERT
- # define ASSERT(x) if (!(x)) fprintf(stderr, "pt: assertion failed in %s:%i.\n",\
- __FILE__, __LINE__)
- #else
- # define ASSERT(x)
- #endif
- #endif
|