On Sun, Feb 25, 2024 at 3:52 AM Dmitry Chestnykh dm.chestnykh@gmail.com wrote:
For BE architectures there is one significant difference in comparison with time64 support for little-endian architectures like ARMv7. The difference is that we strictly need to pass two 64bit values to system calls because Linux Kernel internally uses `struct __kernel_timespec` and similar, which consists of two 64bit fields. For this reason many files have been changed to convert pointers to timespec-family structures (mixed of 64bit and 32bit values) to the pointer of the similar but 64bit-only structures for using as system calls args. This is general prerequisite for any BE architecture.
Signed-off-by: Dmitry Chestnykh dm.chestnykh@gmail.com
Added newline to the end of time64_helpers.h. Yes, we can use the old definition of lll_futex_wait() macro because i reworked a little TO_TS64_P(). include/internal/time64_helpers.h | 31 +++++++++++++++++++ libc/inet/socketcalls.c | 6 +++- libc/misc/sysvipc/sem.c | 9 +++++- libc/signal/sigwait.c | 3 +- libc/sysdeps/linux/common/__rt_sigtimedwait.c | 10 ++++-- libc/sysdeps/linux/common/__rt_sigwaitinfo.c | 2 +- libc/sysdeps/linux/common/alarm.c | 2 +- libc/sysdeps/linux/common/clock_getres.c | 15 +++++++-- libc/sysdeps/linux/common/clock_gettime.c | 14 ++++++++- libc/sysdeps/linux/common/clock_settime.c | 7 ++++- libc/sysdeps/linux/common/ppoll.c | 6 +++- libc/sysdeps/linux/common/pselect.c | 6 +++- libc/sysdeps/linux/common/select.c | 16 +++++++--- libc/sysdeps/linux/common/time.c | 2 +- libc/sysdeps/linux/common/timerfd.c | 9 +++++- libc/sysdeps/linux/common/utimensat.c | 20 +++++++++++- libpthread/nptl/pthread_mutex_timedlock.c | 6 +++- .../sysdeps/unix/sysv/linux/lowlevellock.h | 6 +++- .../sysdeps/unix/sysv/linux/timer_settime.c | 5 ++- librt/clock_gettime.c | 17 ++++++++-- librt/clock_nanosleep.c | 7 +++-- librt/mq_timedreceive.c | 10 ++++-- librt/mq_timedsend.c | 9 ++++-- librt/timer_settime.c | 11 +++++-- 24 files changed, 193 insertions(+), 36 deletions(-) create mode 100644 include/internal/time64_helpers.h
This version looks good to me. Reviewed-by: Max Filippov jcmvbkbc@gmail.com
-- Thanks. -- Max