glibc/sysdeps/nptl
Lukasz Majewski 323592fdc9 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>
2020-09-02 09:49:54 +02:00
..
bits nptl: Move nptl-specific types to separate header 2020-02-09 13:56:48 +01:00
sys Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
aio_misc.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
allocrtsig.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
dl-tunables.list Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
fork.c Linux: set_robust_list syscall number is always available 2020-03-03 12:49:44 +01:00
fork.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
futex-internal.c y2038: nptl: Convert pthread_cond_{clock|timed}wait to support 64 bit time 2020-09-02 09:49:54 +02:00
futex-internal.h y2038: nptl: Convert pthread_cond_{clock|timed}wait to support 64 bit time 2020-09-02 09:49:54 +02:00
gai_misc.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
Implies
internaltypes.h nptl: Add pthread_attr_setsigmask_np, pthread_attr_getsigmask_np 2020-06-02 11:59:18 +02:00
jmp-unwind.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
libc-lock.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
libc-lockP.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
librt-cancellation.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
lowlevellock-futex.h linux: Remove INTERNAL_SYSCALL_DECL 2020-02-14 21:12:45 -03:00
lowlevellock.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
Makeconfig Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
Makefile y2038: nptl: Convert pthread_cond_{clock|timed}wait to support 64 bit time 2020-09-02 09:49:54 +02:00
malloc-machine.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
proc_service.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
pthread-functions.h nptl: Move pthread_setschedparam implementation into libc 2020-02-20 08:57:01 +01:00
pthread-offsets.h nptl: update default pthread-offsets.h 2020-02-10 17:01:21 +01:00
pthread.h nptl: Add pthread_attr_setsigmask_np, pthread_attr_getsigmask_np 2020-06-02 11:59:18 +02:00
setxid.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
shm-directory.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
stdio-lock.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
Subdirs
tcb-offsets.h
thrd_create.c C11 threads: Move implementation to sysdeps/pthread 2020-02-09 13:56:48 +01:00
thread_db.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
timer_routines.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
tst-mqueue8x.c
unwind-forcedunwind.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00