[PATCH 4/5] c11: Switch to use pthread_mutex_clocklock and pthread_cond_clockwait to implement cnd and mtx lock and wait
Florian Weimer
fweimer@redhat.com
Tue Jun 20 09:15:28 GMT 2023
* Yonggang Luo via Libc-alpha:
> Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
> ---
> sysdeps/pthread/cnd_timedwait.c | 8 ++++----
> sysdeps/pthread/mtx_timedlock.c | 6 +++---
> sysdeps/unix/sysv/linux/cnd_timedwait.c | 4 ++--
> sysdeps/unix/sysv/linux/mtx_timedlock.c | 4 ++--
> 4 files changed, 11 insertions(+), 11 deletions(-)
>
> diff --git a/sysdeps/pthread/cnd_timedwait.c b/sysdeps/pthread/cnd_timedwait.c
> index 25df50cb3a..3785fd21ba 100644
> --- a/sysdeps/pthread/cnd_timedwait.c
> +++ b/sysdeps/pthread/cnd_timedwait.c
> @@ -20,10 +20,10 @@
>
> int
> cnd_timedwait (cnd_t *restrict cond, mtx_t *restrict mutex,
> - const struct timespec* restrict time_point)
> + const struct timespec *restrict time_point)
> {
> - int err_code = __pthread_cond_timedwait ((pthread_cond_t *) cond,
> - (pthread_mutex_t *) mutex,
> - time_point);
> + int err_code = pthread_cond_clockwait ((pthread_cond_t *) cond,
> + (pthread_mutex_t *) mutex,
> + CLOCK_REALTIME, time_point);
> return thrd_err_map (err_code);
> }
Doesn't this cause linknamespace failures during “make check”?
Thanks,
Florian
More information about the Libc-alpha
mailing list