y2038: lib/cobalt/internal: dispatch event_wait
PATCH 2/3 y2038: lib/cobalt/internal: dispatch event_wait
If sizeof time_t bigger than 4, which means glibc supports 64bit timespec, go to event_wait64.
otherwise, go to original event_wait.
Signed-off-by Song Chen <[email protected]>
--- lib/cobalt/internal.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
lib/cobalt/internal.c +6 -1
@@ -482,8 +482,13 @@ int cobalt_event_wait(cobalt_event_t *event,pthread_setcanceltype (PTHREAD_CANCEL_ASYNCHRONOUS , &oldtype); +#ifdef __USE_TIME_BITS64 + ret =XENOMAI_SYSCALL5 (sc_cobalt_event_wait64, + event, bits, bits_r, mode, timeout); +#else ret =XENOMAI_SYSCALL5 (sc_cobalt_event_wait, event, bits, bits_r, mode, timeout); +#endif pthread_setcanceltype (oldtype,NULL );
@@ -579,4 +584,4 @@ void cobalt_features_init(struct cobalt_featinfo *f)/* Trigger arch specific feature initialization */ cobalt_arch_check_features (f); -} +}
Signature · 1 line
2.7.4