summaryrefslogtreecommitdiff
path: root/libpthread/linuxthreads.old/sysdeps
diff options
context:
space:
mode:
authorLeonid Lisovskiy <lly.dev@gmail.com>2016-01-03 21:49:51 +0300
committerWaldemar Brodkorb <wbx@uclibc-ng.org>2016-01-06 23:54:29 +0100
commitc1b5c59ece6b223f2941769ec484da4d0dc2baa6 (patch)
tree929db231c662b8fd10248aa5ec920113b62b7024 /libpthread/linuxthreads.old/sysdeps
parent16fc66a4faf631fffa518eb7806ec70e03c78f63 (diff)
linuxthreads.old: Implement pthread_tryjoin_np(), pthread_timedjoin_np()
Some applications needs it. Signed-off-by: Leonid Lisovskiy <lly.dev@gmail.com>
Diffstat (limited to 'libpthread/linuxthreads.old/sysdeps')
-rw-r--r--libpthread/linuxthreads.old/sysdeps/pthread/pthread.h15
1 files changed, 15 insertions, 0 deletions
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