]> sourceware.org Git - glibc.git/commitdiff
nptl: Fix niggles with pthread_clockjoin_np
authorMike Crowe <mac@mcrowe.com>
Mon, 4 Nov 2019 19:36:21 +0000 (16:36 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Mon, 4 Nov 2019 19:44:49 +0000 (16:44 -0300)
Joseph Myers spotted[1] that 69ca4b54c151cec42ccca5e05790efc1a8206b47 added
pthread_clockjoin_np to sysdeps/nptl/pthread.h but not to its hppa-specific
equivalent sysdeps/unix/sysv/linux/hppa/pthread.h.

Rafal Luzynski spotted[2] typos in the NEWS entry and manual updates too.

Florian Weimer spotted[3] that the clockid parameter was not using a
reserved identifier in pthread.h.

[1] https://sourceware.org/ml/libc-alpha/2019-11/msg00016.html
[2] https://sourceware.org/ml/libc-alpha/2019-11/msg00019.html
[3] https://sourceware.org/ml/libc-alpha/2019-11/msg00022.html

Reviewed-by: Joseph Myers <joseph@codesourcery.com>
Reviewed-by: Rafal Luzynski <digitalfreak@lingonborough.com>
Reviewed-by: Florian Weimer <fw@deneb.enyo.de>
NEWS
manual/threads.texi
sysdeps/nptl/pthread.h
sysdeps/unix/sysv/linux/hppa/pthread.h

diff --git a/NEWS b/NEWS
index 3006b1a8e471bfbe90118dc763f5f0b7d60a7ee7..2fc1f897716fc233cc87e5f652e433b5c296605a 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -35,7 +35,7 @@ Major new features:
   tz_dsttime fields are zero.
 
 * The function pthread_clockjoin_np has been added, enabling join with a
-  terminated thread with an specific clock.  It allows waiting against
+  terminated thread with a specific clock.  It allows waiting against
   CLOCK_MONOTONIC and CLOCK_REALTIME.  This function is a GNU extension.
 
 Deprecated and removed features, and other changes affecting compatibility:
index e40b55c090dcd7ecab55a21087a0a451f1f297a3..0858ef8f92a4520afa2c54ebb20cfd0692fb0dc4 100644 (file)
@@ -759,7 +759,7 @@ will wait forever in the same way as @code{pthread_join}.
                                      const struct timespec *@var{abstime})
 @standards{GNU, pthread.h}
 @safety{@prelim{}@mtsafe{}@asunsafe{@asulock{}}@acunsafe{@aculock{}}}
-Behaves like @code{pthread_timedjoin_np} except that time absolute time in
+Behaves like @code{pthread_timedjoin_np} except that the absolute time in
 @var{abstime} is measured against the clock specified by @var{clockid}.
 @end deftypefun
 
index d2fe6b7479263cf40033ff0a2f758ceac5a18ad4..a4ff323b76c7c05db93d124b831c215cfb4a510d 100644 (file)
@@ -272,7 +272,7 @@ extern int pthread_timedjoin_np (pthread_t __th, void **__thread_return,
    This function is a cancellation point and therefore not marked with
    __THROW.  */
 extern int pthread_clockjoin_np (pthread_t __th, void **__thread_return,
-                                 clockid_t clockid,
+                                 clockid_t __clockid,
                                 const struct timespec *__abstime);
 #endif
 
index 424135c800d49d19b317f0fdf791b7abb16729fb..300c187759b91df1cdd410835f3300262983e369 100644 (file)
@@ -238,6 +238,17 @@ extern int pthread_tryjoin_np (pthread_t __th, void **__thread_return) __THROW;
    __THROW.  */
 extern int pthread_timedjoin_np (pthread_t __th, void **__thread_return,
                                 const struct timespec *__abstime);
+
+/* Make calling thread wait for termination of the thread TH, but only
+   until TIMEOUT measured against the clock specified by CLOCKID.  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_clockjoin_np (pthread_t __th, void **__thread_return,
+                                 clockid_t __clockid,
+                                const struct timespec *__abstime);
 #endif
 
 /* Indicate that the thread TH is never to be joined with PTHREAD_JOIN.
This page took 0.053493 seconds and 5 git commands to generate.