lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 1 | /**************************************************************************** |
| 2 | ** |
| 3 | ** NAME: |
| 4 | ** debug.h |
| 5 | ** |
| 6 | ** DESCRIPTION: |
| 7 | ** This header file defines the debug macros used in pthreads. To turn |
| 8 | ** debugging on, add -DDEBUG_PT to CFLAGS. It was added to the original |
| 9 | ** distribution of linuxthreads. |
| 10 | ** |
| 11 | ** This program is free software; you can redistribute it and/or |
| 12 | ** modify it under the terms of the GNU Library General Public License |
| 13 | ** as published by the Free Software Foundation; either version 2 |
| 14 | ** of the License, or (at your option) any later version. |
| 15 | ** |
| 16 | ** This program is distributed in the hope that it will be useful, |
| 17 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 18 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 19 | ** GNU Library General Public License for more details. |
| 20 | ** |
| 21 | ****************************************************************************/ |
| 22 | |
| 23 | #ifndef _PT_DEBUG_H |
| 24 | #define _PT_DEBUG_H |
| 25 | |
| 26 | #include <features.h> |
| 27 | |
| 28 | #ifdef __DODEBUG_PT__ |
| 29 | # define DEBUG_PT |
| 30 | #endif |
| 31 | |
| 32 | /* define the PDEBUG macro here */ |
| 33 | #undef PDEBUG |
| 34 | #ifdef DEBUG_PT |
| 35 | # define PDEBUG(fmt, args...) __pthread_message("%s: " fmt, __FUNCTION__, ## args) |
| 36 | #else |
| 37 | # define PDEBUG(fmt, args...) /* debug switched off */ |
| 38 | #endif |
| 39 | |
| 40 | #endif /* _PT_DEBUG_H */ |