This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 0/7] Implement proposed POSIX _clockwait variants of existing _timedwait functions
- From: Yann Droneaud <ydroneaud at opteya dot com>
- To: Mike Crowe <mac at mcrowe dot com>, libc-alpha at sourceware dot org
- Date: Fri, 15 Mar 2019 14:25:43 +0100
- Subject: Re: [PATCH 0/7] Implement proposed POSIX _clockwait variants of existing _timedwait functions
- References: <cover.b0c66849a87ca79889a49f2f1f2563b1a8a15d8b.1551291557.git-series.mac@mcrowe.com>
Hi,
Le mercredi 27 février 2019 à 18:23 +0000, Mike Crowe a écrit :
> My attempts[1] to add a variant of pthread_cond_timedwait that would accept
> a clockid_t parameter led me to propose[2] to The Austin Group the addition
> of an entire family of functions that accept a clockid_t parameter to
> indicate the clock that the timespec absolute timeout parameter should be
> measured against. They responded positively to the request but an
> implementation is required before the proposal can proceed.
>
> This patch series is the first part of that implementation in glibc, it
> contains four new functions:
>
> int pthread_cond_clockwait(pthread_cond_t *cond, pthread_mutex_t *mutex,
> clockid_t clock, const struct timespec *abstime)
>
> int pthread_rwlock_clockrdlock(pthread_rwlock_t *rwlock, clockid_t clock,
> const struct timespec *abstime)
>
> int pthread_rwlock_clockwrlock(pthread_rwlock_t *rwlock, clockid_t clock,
> const struct timespec *abstime)
>
> int sem_clockwait(sem_t *restrict, clockid_t clock_id, const struct
> timespec *restrict)
>
There's also a pthread_timedjoin_np() that could benefit from having
"pthread_clockjoin_np()" sibling.
Regards.
--
Yann Droneaud
OPTEYA