y2038: lib/cobalt/internal: dispatch monitor_wait
PATCH 2/3 y2038: lib/cobalt/internal: dispatch monitor_wait
If sizeof time_t bigger than 4, which means glibc supports 64bit timespec, go to monitor_wait64.
otherwise, go to original monitor_wait.
Signed-off-by Song Chen <[email protected]>
--- lib/cobalt/internal.c | 5 +++++ 1 file changed, 5 insertions(+)
lib/cobalt/internal.c +5 -0
@@ -256,8 +256,13 @@ int cobalt_monitor_wait(cobalt_monitor_t *mon, int event,pthread_setcanceltype (PTHREAD_CANCEL_ASYNCHRONOUS , &oldtype); +#ifdef __USE_TIME_BITS64 + ret =XENOMAI_SYSCALL4 (sc_cobalt_monitor_wait64, + mon, event, ts, &opret); +#else ret =XENOMAI_SYSCALL4 (sc_cobalt_monitor_wait, mon, event, ts, &opret); +#endif pthread_setcanceltype (oldtype,NULL );
Signature · 1 line
2.7.4