Skip to contentSkip to conversation

y2038: lib/cobalt/mutex: dispatch mutex_timedlock

PATCH Superseded Florian Bezdeka 1 participant 1 message Jul 30, 2021

v2 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 4/5 y2038: lib/cobalt/mutex: dispatch mutex_timedlock

From: Song Chen <[email protected]>

In case the libc in use reports a 64 bit time_t dispacht mutex_timedlock to the kernel entry point that accepts it.

---
 lib/cobalt/mutex.c | 4 ++++
 1 file changed, 4 insertions(+)
lib/cobalt/mutex.c +4 -0
index 29236c75a..73e45a1c4 100644
@@ -479,7 +479,11 @@ slow_path:
 	}
 
 	do {
+#ifdef __USE_TIME_BITS64
+		ret = XENOMAI_SYSCALL2(sc_cobalt_mutex_timedlock64, _mutex, to);
+#else
 		ret = XENOMAI_SYSCALL2(sc_cobalt_mutex_timedlock, _mutex, to);
+#endif
 	} while (ret == -EINTR);
 
 	if (ret == 0)
Signature · 1 line
2.30.2