diff options
| author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2025-03-09 22:25:14 +0100 |
|---|---|---|
| committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2025-03-25 01:05:11 +0100 |
| commit | b62692d3c77617747263a4cff5ea3db1ab731df0 (patch) | |
| tree | 21f7065812aa3a31b70a82e5091829ebd769d1af /sysdeps/nptl | |
| parent | e3a6e85d67f1a48dec3e2557a83d6ce1544a58cb (diff) | |
| download | glibc-b62692d3c77617747263a4cff5ea3db1ab731df0.tar.xz glibc-b62692d3c77617747263a4cff5ea3db1ab731df0.zip | |
aio_suspend64: Fix clock discrepancy [BZ #32795]
cc5d5852c65e ("y2038: Convert aio_suspend to support 64 bit time")
switched from __clock_gettime (CLOCK_REALTIME, &now); to __clock_gettime64
(CLOCK_MONOTONIC, &ts);, but pthread_cond_timedwait is based on the
absolute realtime clock, so migrate to using pthread_cond_clockwait to
select CLOCK_MONOTONIC. Also fix AIO_MISC_WAIT into passing
CLOCK_MONOTONIC to __futex_abstimed_wait64.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'sysdeps/nptl')
| -rw-r--r-- | sysdeps/nptl/aio_misc.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sysdeps/nptl/aio_misc.h b/sysdeps/nptl/aio_misc.h index ddc5acc379..87fd759f13 100644 --- a/sysdeps/nptl/aio_misc.h +++ b/sysdeps/nptl/aio_misc.h @@ -50,7 +50,7 @@ FUTEX_PRIVATE); \ else \ status = __futex_abstimed_wait64 ((unsigned int *) futexaddr, \ - oldval, CLOCK_REALTIME, timeout, FUTEX_PRIVATE); \ + oldval, CLOCK_MONOTONIC, timeout, FUTEX_PRIVATE); \ if (status != EAGAIN) \ break; \ \ |
