All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 2/3] y2038: lib/cobalt/mutex: dispatch mutex_timedlock
@ 2021-06-03 10:56 Song Chen
  0 siblings, 0 replies; only message in thread
From: Song Chen @ 2021-06-03 10:56 UTC (permalink / raw)
  To: florian.bezdeka, xenomai

If sizeof time_t bigger than 4, which means glibc supports
64bit timespec, go to mutex_timedlock64.

otherwise, go to original mutex_timedlock.

Signed-off-by: Song Chen <chensong_2000@189.cn>
---
 lib/cobalt/mutex.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/cobalt/mutex.c b/lib/cobalt/mutex.c
index 29236c7..73e45a1 100644
--- a/lib/cobalt/mutex.c
+++ b/lib/cobalt/mutex.c
@@ -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)
-- 
2.7.4



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-06-03 10:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-03 10:56 [PATCH v2 2/3] y2038: lib/cobalt/mutex: dispatch mutex_timedlock Song Chen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.