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, not the monotonic clock. --- rt/aio_suspend.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/rt/aio_suspend.c b/rt/aio_suspend.c index 2257cd80d4..49a86f6ab3 100644 --- a/rt/aio_suspend.c +++ b/rt/aio_suspend.c @@ -161,7 +161,7 @@ ___aio_suspend_time64 (const struct aiocb *const list[], int nent, struct __timespec64 ts; if (timeout != NULL) { - __clock_gettime64 (CLOCK_MONOTONIC, &ts); + __clock_gettime64 (CLOCK_REALTIME, &ts); ts.tv_sec += timeout->tv_sec; ts.tv_nsec += timeout->tv_nsec; if (ts.tv_nsec >= 1000000000) -- 2.47.2