1 2010-02-27 Aurelien Jarno <aurelien@aurel32.net>
3 * pthreadP.h(INVALID_TD_P, INVALID_NOT_TERMINATED_TD_P): detect
7 nptl/pthreadP.h | 4 ++--
8 1 file changed, 2 insertions(+), 2 deletions(-)
13 /* Simplified test. This will not catch all invalid descriptors but
14 is better than nothing. And if the test triggers the thread
15 descriptor is guaranteed to be invalid. */
16 -# define INVALID_TD_P(pd) __builtin_expect ((pd)->tid <= 0, 0)
17 -# define INVALID_NOT_TERMINATED_TD_P(pd) __builtin_expect ((pd)->tid < 0, 0)
18 +# define INVALID_TD_P(pd) __builtin_expect (!pd || ((pd)->tid <= 0), 0)
19 +# define INVALID_NOT_TERMINATED_TD_P(pd) __builtin_expect (!pd || ((pd)->tid < 0), 0)