From c1b5c59ece6b223f2941769ec484da4d0dc2baa6 Mon Sep 17 00:00:00 2001 From: Leonid Lisovskiy Date: Sun, 3 Jan 2016 21:49:51 +0300 Subject: linuxthreads.old: Implement pthread_tryjoin_np(), pthread_timedjoin_np() Some applications needs it. Signed-off-by: Leonid Lisovskiy --- libpthread/linuxthreads.old/sysdeps/pthread/pthread.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'libpthread/linuxthreads.old/sysdeps/pthread/pthread.h') diff --git a/libpthread/linuxthreads.old/sysdeps/pthread/pthread.h b/libpthread/linuxthreads.old/sysdeps/pthread/pthread.h index 879bcea4e..3c7044d8b 100644 --- a/libpthread/linuxthreads.old/sysdeps/pthread/pthread.h +++ b/libpthread/linuxthreads.old/sysdeps/pthread/pthread.h @@ -179,6 +179,21 @@ extern void pthread_exit (void *__retval) __attribute__ ((__noreturn__)); is not NULL. */ extern int pthread_join (pthread_t __th, void **__thread_return); +#ifdef __USE_GNU +/* Check whether thread TH has terminated. If yes return the status of + the thread in *THREAD_RETURN, if THREAD_RETURN is not NULL. */ +extern int pthread_tryjoin_np (pthread_t __th, void **__thread_return) __THROW; + +/* Make calling thread wait for termination of the thread TH, but only + until TIMEOUT. The exit status of the thread is stored in + *THREAD_RETURN, if THREAD_RETURN is not NULL. + + This function is a cancellation point and therefore not marked with + __THROW. */ +extern int pthread_timedjoin_np (pthread_t __th, void **__thread_return, + __const struct timespec *__abstime); +#endif + /* Indicate that the thread TH is never to be joined with PTHREAD_JOIN. The resources of TH will therefore be freed immediately when it terminates, instead of waiting for another thread to perform PTHREAD_JOIN -- cgit v1.2.3