From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2155) id 03A1C3858413; Mon, 9 Aug 2021 10:50:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 03A1C3858413 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Corinna Vinschen To: newlib-cvs@sourceware.org Subject: [newlib-cygwin] libc: Added prototypes for new POSIX APIs X-Act-Checkin: newlib-cygwin X-Git-Author: Matt Joyce X-Git-Refname: refs/heads/master X-Git-Oldrev: 0cb40f415b7d4f11f819b03320770737fa072be8 X-Git-Newrev: 4f81149937844582c6ae941acc80e623c9fcbbff Message-Id: <20210809105023.03A1C3858413@sourceware.org> Date: Mon, 9 Aug 2021 10:50:23 +0000 (GMT) X-BeenThere: newlib-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Newlib GIT logs List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Aug 2021 10:50:23 -0000 https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=4f81149937844582c6ae941acc80e623c9fcbbff commit 4f81149937844582c6ae941acc80e623c9fcbbff Author: Matt Joyce Date: Fri Aug 6 22:04:42 2021 +0200 libc: Added prototypes for new POSIX APIs Added function prototypes to newlib/libc/include/pthread.h for the following Issue 8 Standard APIs: pthread_cond_clockwait() pthread_mutex_clocklock() pthread_rwlock_clockrdlock() pthread_rwlock_clockwrlock() Diff: --- newlib/libc/include/pthread.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/newlib/libc/include/pthread.h b/newlib/libc/include/pthread.h index c9d24d6e0..c99ad395d 100644 --- a/newlib/libc/include/pthread.h +++ b/newlib/libc/include/pthread.h @@ -87,6 +87,12 @@ int pthread_mutex_timedlock (pthread_mutex_t *__mutex, #endif /* _POSIX_TIMEOUTS */ +#if __GNU_VISIBLE +/* The Issue 8 standard adds pthread_mutex_clocklock() */ +int pthread_mutex_clocklock(pthread_mutex_t *__restrict, clockid_t, + const struct timespec *__restrict); +#endif /* __GNU_VISIBLE */ + /* Condition Variable Initialization Attributes, P1003.1c/Draft 10, p. 96 */ int pthread_condattr_init (pthread_condattr_t *__attr); @@ -126,6 +132,13 @@ int pthread_cond_wait (pthread_cond_t *__cond, pthread_mutex_t *__mutex); int pthread_cond_timedwait (pthread_cond_t *__cond, pthread_mutex_t *__mutex, const struct timespec *__abstime); + +#if __GNU_VISIBLE +/* The Issue 8 standard adds pthread_cond_clockwait() */ +int pthread_cond_clockwait(pthread_cond_t *__restrict, + pthread_mutex_t *__restrict, clockid_t, + const struct timespec *__restrict); +#endif /* __GNU_VISIBLE */ #if defined(_POSIX_THREAD_PRIORITY_SCHEDULING) @@ -423,6 +436,15 @@ int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock); int pthread_rwlock_timedwrlock (pthread_rwlock_t *__rwlock, const struct timespec *__abstime); +#if __GNU_VISIBLE +/* The Issue 8 standard adds pthread_rwlock_clockrdlock() +* and pthread_rwlock_clockwrlock()*/ +int pthread_rwlock_clockrdlock(pthread_rwlock_t *__restrict, clockid_t, + const struct timespec *__restrict); +int pthread_rwlock_clockwrlock(pthread_rwlock_t *__restrict, clockid_t, + const struct timespec *__restrict); +#endif /* __GNU_VISIBLE */ + #endif /* defined(_POSIX_READER_WRITER_LOCKS) */