diff options
author | Lukasz Majewski <lukma@denx.de> | 2020-11-23 17:47:20 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2020-11-23 18:06:25 -0300 |
commit | c435196bf218924128627ab2bd4a4827d550cd76 (patch) | |
tree | 13b57a3cb8f70e3f5b94cd3616f68d9e2df13245 /sysdeps/unix/sysv/linux/time.c | |
parent | 686d38b35e0a21c2fa37b5d3bf212b4a4611d260 (diff) | |
download | glibc-azanella/futex-refactor.tar.gz |
y2038: Convert aio_suspend to support 64 bit timeazanella/futex-refactor
The aio_suspend function has been converted to support 64 bit time.
In the __aio_suspend_common64() function not all occurrences of struct
timespec, clock_gettime() and pthread_cond_timedwait() have been replaced
with their 64 bit counterparts, as i686-gnu port (HURD) don't #define
DONT_NEED_AIO_MISC_COND and requires them (as it is not yet supporting 64
bit time for being Y2038 safe).
This change uses:
- New __futex_reltimed_wait64 (instead of futex_reltimed_wait)
- New __futex_reltimed_wait_cancellable64
(instead of futex_reltimed_wait_cancellable)
from ./sysdeps/nptl/futex-helpers.h
The aio_suspend() accepts relative timeout.
The __aio_suspend() is supposed to be run on ports with __TIMESIZE !=64 and
__WORDSIZE==32. It internally utilizes __aio_suspend_time64() and hence the
conversion from 32 bit struct timespec to 64 bit one is required.
For ports supporting 64 bit time the __aio_suspend_time64() will be used
either via alias (to __aio_suspend when __TIMESIZE==64) or redirection
(when -D_TIME_BITS=64 is passed).
Build tests:
./src/scripts/build-many-glibcs.py glibcs
---
Changes for v2:
- Add missing -EOVERFLOW error handling for __futex_reltimed_wait64 and
_futex_reltimed_wait_cancelable64
Changes for v3:
- Remove "__" prefix from futex_reltimed_wait64 and
futex_reltimed_wait_cancellable64
- Remove some code, as HURD is not defining DONT_NEED_AIO_MISC_COND
(i.e. Linux ports are defining it) and add in-code explanation why
the code is NOT converted to support 64 bit time.
- Rewrite the commit message
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Diffstat (limited to 'sysdeps/unix/sysv/linux/time.c')
0 files changed, 0 insertions, 0 deletions