diff options
Diffstat (limited to 'linuxthreads/internals.h')
-rw-r--r-- | linuxthreads/internals.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/linuxthreads/internals.h b/linuxthreads/internals.h index c523d6f23b..405af3c0df 100644 --- a/linuxthreads/internals.h +++ b/linuxthreads/internals.h @@ -298,6 +298,11 @@ static inline pthread_handle thread_handle(pthread_t id) static inline int invalid_handle(pthread_handle h, pthread_t id) { + return h->h_descr == NULL || h->h_descr->p_tid != id || h->h_descr->p_terminated; +} + +static inline int nonexisting_handle(pthread_handle h, pthread_t id) +{ return h->h_descr == NULL || h->h_descr->p_tid != id; } |