diff options
author | Lukasz Majewski <lukma@denx.de> | 2020-08-11 10:49:03 +0200 |
---|---|---|
committer | Lukasz Majewski <lukma@denx.de> | 2020-09-02 09:49:54 +0200 |
commit | 323592fdc92a0021319419f210a6052542856654 (patch) | |
tree | c1869089a17566d851f9b3ef1e7f442651a544cb /iconvdata/ibm864.c | |
parent | 30e5069c7d4b51288d3e6f75f53a6ad2f5e71b0f (diff) | |
download | glibc-323592fdc92a0021319419f210a6052542856654.tar.gz |
y2038: nptl: Convert pthread_cond_{clock|timed}wait to support 64 bit time
The pthread_cond_clockwait and pthread_cond_timedwait have been converted
to support 64 bit time.
This change introduces new futex_abstimed_wait_cancelable64 function in
./sysdeps/nptl/futex-helpers.c, which uses futex_time64 where possible
and tries to replace low-level preprocessor macros from
lowlevellock-futex.h
The pthread_cond_{clock|timed}wait only accepts absolute time. Moreover,
there is no need to check for NULL passed as *abstime pointer as
__pthread_cond_wait_common() always passes non-NULL struct __timespec64
pointer to futex_abstimed_wait_cancellable64().
For systems with __TIMESIZE != 64 && __WORDSIZE == 32:
- Conversions between 64 bit time to 32 bit are necessary
- Redirection to __pthread_cond_{clock|timed}wait64 will provide support
for 64 bit time
The futex_abstimed_wait_cancelable64 function has been put into a separate
file on the purpose - to avoid issues apparent on the m68k architecture
related to small number of available registers (there is not enough
registers to put all necessary arguments in them if the above function
would be added to futex-internal.h with __always_inline attribute).
In fact - new function - namely __futex_abstimed_wait_cancellable32 is
used to reduce number of needed registers (as some in-register values are
stored on the stack when function call is made).
Build tests:
./src/scripts/build-many-glibcs.py glibcs
Run-time tests:
- Run specific tests on ARM/x86 32bit systems (qemu):
https://github.com/lmajewski/meta-y2038 and run tests:
https://github.com/lmajewski/y2038-tests/commits/master
Above tests were performed with Y2038 redirection applied as well as without
to test the proper usage of both __pthread_cond_{clock|timed}wait64 and
__pthread_cond_{clock|timed}wait.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'iconvdata/ibm864.c')
0 files changed, 0 insertions, 0 deletions