[PATCH v2 00/20] y2038: libcobalt: Allow both, native + time64_t interfaces at the same time
Florian Bezdeka <[email protected]>
| Newsgroups | dev.linux.lists.xenomai |
|---|---|
| Message-ID | <20260302-wip-flo-fix-time64-32bit-native-v2-0-7caefce29bcd@siemens.com> |
Hi all, The current time64_t / y2038 support switched libcobalt to time64_t only, removing the interfaces for the native time_t type. With that series applied both worlds can live together in one libcobalt build which should hopefully increase the backward compatibility a bit. All time64_t services have been moved into a separate compile unit that can be compiled twice now, if necessary. Unaffected environments like x86_64 won't do that. It's not necessary as the native type is already 64 bit. The most tricky part where the __RT(), __STD() and __WRAP() macros. That has been solved by redirects on linker level. To: Xenomai <[email protected]> Cc: Jan Kiszka <[email protected]> Signed-off-by: Florian Bezdeka <[email protected]> --- Changes in v2: - SPDX headers for all created files - Add copyright notice to all created files I checked all moved code parts for their previous authors and in case there was a copyright notice in the old location I copied it over - Link to v1: https://lore.kernel.org/r/20260220-wip-flo-fix-time64-32bit-native-v1-0-731c773e72cc@siemens.com --- Florian Bezdeka (20): lib/cobalt: Introduce cond.h lib/cobalt: Introduce mq.h lib/cobalt: Introduce mutex.h lib/cobalt: Introduce rtdm.h lib/cobalt: Introduce wrappers_time64.c lib/cobalt: clock: Move all time64 related services to wrappers_time64.c lib/cobalt: cond: Move all time64 related services to wrappers_time64.c lib/cobalt: mq: Move all time64 related services to wrappers_time64.c lib/cobalt: mutex: Move all time64 related services to wrappers_time64.c lib/cobalt: mutex: Provide time64 variant of pthread_timedmutex_lock_interruptible_np lib/cobalt: rtdm: Move all time64 related services to wrappers_time64.c lib/cobalt: select: Move select services into wrappers_time64.c lib/cobalt: semaphore: Move time64 related services to wrappers_time64.c lib/cobalt: signal: Move time64 related services to wrappers_time64.c lib/cobalt: timer: Move all time64 related services to wrappers_time64.c lib/cobalt: timerfd: Move time64 related services to wrappers_time64.c lib/cobalt: Move XN_USE_TIME64_SYSCALL to wrappers_time64.c lib/cobalt: Finally build the native time_t interfaces on top lib/cobalt: thread: Cleanup and reorder includes scripts/xeno-config: Allow disabling the y2038 / time64_t support include/cobalt/pthread.h | 16 +- include/cobalt/wrappers.h | 13 +- lib/cobalt/Makefile.am | 27 +- lib/cobalt/clock.c | 309 +----------- lib/cobalt/cond.c | 154 +----- lib/cobalt/cond.h | 85 ++++ lib/cobalt/internal.h | 5 - lib/cobalt/mq.c | 151 +----- lib/cobalt/mq.h | 39 ++ lib/cobalt/mutex.c | 211 +------- lib/cobalt/mutex.h | 97 ++++ lib/cobalt/rtdm.c | 105 +--- lib/cobalt/rtdm.h | 37 ++ lib/cobalt/select.c | 108 ---- lib/cobalt/semaphore.c | 67 +-- lib/cobalt/signal.c | 26 +- lib/cobalt/thread.c | 8 +- lib/cobalt/timer.c | 121 +---- lib/cobalt/timerfd.c | 39 -- lib/cobalt/wrappers_time64.c | 1097 +++++++++++++++++++++++++++++++++++++++++ scripts/xeno-config-cobalt.in | 5 + 21 files changed, 1439 insertions(+), 1281 deletions(-) --- base-commit: c7226edf0167451a290b9a82e7331a15cc88122b change-id: 20260219-wip-flo-fix-time64-32bit-native-8e5d8b7c7ca8 Best regards, -- Florian Bezdeka <[email protected]>