public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Adhemerval Zanella <azanella@sourceware.org>
To: glibc-cvs@sourceware.org
Subject: [glibc] nptl: Add POSIX-proposed _clock functions to hppa pthread.h
Date: Thu, 18 Jul 2019 16:33:00 -0000	[thread overview]
Message-ID: <20190718163308.9388.qmail@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=2ab9ad573520113395046071446c22f984002152

commit 2ab9ad573520113395046071446c22f984002152
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Wed Jul 17 14:56:51 2019 -0300

    nptl: Add POSIX-proposed _clock functions to hppa pthread.h
    
    The pthread _clock functions that were recently added to nptl need to be
    declared in hppa's pthread.h too. After this change, the function
    declaration part of sysdeps/nptl/pthread.h and
    sysdeps/unix/sysv/linux/hppa/pthread.h are identical.
    
    	* sysdeps/unix/sysv/linux/hppa/pthread.h: Add declarations of
    	functions recently added to sysdeps/nptl/pthread.h:
    	pthread_mutex_clocklock, pthread_rwlock_clockrdlock,
    	pthread_rwlock_clockwrlock and pthread_cond_clockwait.
    
    Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>

Diff:
---
 ChangeLog                              |  5 +++++
 sysdeps/unix/sysv/linux/hppa/pthread.h | 36 ++++++++++++++++++++++++++++++++++
 2 files changed, 41 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 0f10e41..2984ddd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2019-07-18  Mike Crowe  <mac@mcrowe.com>
 
+	* sysdeps/unix/sysv/linux/hppa/pthread.h: Add declarations of
+	functions recently added to sysdeps/nptl/pthread.h:
+	pthread_mutex_clocklock, pthread_rwlock_clockrdlock,
+	pthread_rwlock_clockwrlock and pthread_cond_clockwait.
+
 	* nptl/forward.c: Remove unnecessary __pthread_cond_clockwait and
 	pthread_cond_clockwait forwarding functions.  There are no internal
 	users, so it is unnecessary to expose these functions in libc.so.
diff --git a/sysdeps/unix/sysv/linux/hppa/pthread.h b/sysdeps/unix/sysv/linux/hppa/pthread.h
index 45e706c..5a1c641 100644
--- a/sysdeps/unix/sysv/linux/hppa/pthread.h
+++ b/sysdeps/unix/sysv/linux/hppa/pthread.h
@@ -746,6 +746,13 @@ extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex,
 				    __abstime) __THROWNL __nonnull ((1, 2));
 #endif
 
+#ifdef __USE_GNU
+extern int pthread_mutex_clocklock (pthread_mutex_t *__restrict __mutex,
+				    clockid_t __clockid,
+				    const struct timespec *__restrict
+				    __abstime) __THROWNL __nonnull ((1, 3));
+#endif
+
 /* Unlock a mutex.  */
 extern int pthread_mutex_unlock (pthread_mutex_t *__mutex)
      __THROWNL __nonnull ((1));
@@ -885,6 +892,13 @@ extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock,
 				       __abstime) __THROWNL __nonnull ((1, 2));
 # endif
 
+# ifdef __USE_GNU
+extern int pthread_rwlock_clockrdlock (pthread_rwlock_t *__restrict __rwlock,
+				       clockid_t __clockid,
+				       const struct timespec *__restrict
+				       __abstime) __THROWNL __nonnull ((1, 3));
+# endif
+
 /* Acquire write lock for RWLOCK.  */
 extern int pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock)
      __THROWNL __nonnull ((1));
@@ -900,6 +914,13 @@ extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock,
 				       __abstime) __THROWNL __nonnull ((1, 2));
 # endif
 
+# ifdef __USE_GNU
+extern int pthread_rwlock_clockwrlock (pthread_rwlock_t *__restrict __rwlock,
+				       clockid_t __clockid,
+				       const struct timespec *__restrict
+				       __abstime) __THROWNL __nonnull ((1, 3));
+# endif
+
 /* Unlock RWLOCK.  */
 extern int pthread_rwlock_unlock (pthread_rwlock_t *__rwlock)
      __THROWNL __nonnull ((1));
@@ -979,6 +1000,21 @@ extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond,
 				   const struct timespec *__restrict __abstime)
      __nonnull ((1, 2, 3));
 
+# ifdef __USE_GNU
+/* Wait for condition variable COND to be signaled or broadcast until
+   ABSTIME measured by the specified clock. MUTEX is assumed to be
+   locked before. CLOCK is the clock to use. ABSTIME is an absolute
+   time specification against CLOCK's epoch.
+
+   This function is a cancellation point and therefore not marked with
+   __THROW. */
+extern int pthread_cond_clockwait (pthread_cond_t *__restrict __cond,
+				   pthread_mutex_t *__restrict __mutex,
+				   __clockid_t __clock_id,
+				   const struct timespec *__restrict __abstime)
+     __nonnull ((1, 2, 4));
+# endif
+
 /* Functions for handling condition variable attributes.  */
 
 /* Initialize condition variable attribute ATTR.  */


                 reply	other threads:[~2019-07-18 16:33 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190718163308.9388.qmail@sourceware.org \
    --to=azanella@sourceware.org \
    --cc=glibc-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).