xenomai.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Florian Bezdeka <florian.bezdeka@siemens.com>
To: xenomai@lists.linux.dev, jan.kiszka@siemens.com
Cc: Florian Bezdeka <florian.bezdeka@siemens.com>
Subject: [PATCH 06/13] y2038: lib/cobalt: Dispatch timer_gettime
Date: Mon, 08 May 2023 10:13:28 +0200	[thread overview]
Message-ID: <20230508-florian-y2038-part-two-v1-6-a417812fba85@siemens.com> (raw)
In-Reply-To: <20230508-florian-y2038-part-two-v1-0-a417812fba85@siemens.com>

If glibc reports time64_t support, timer_gettime is now dispatched
to the time64_t based syscall.

Signed-off-by: Florian Bezdeka <florian.bezdeka@siemens.com>
---
 lib/cobalt/timer.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/lib/cobalt/timer.c b/lib/cobalt/timer.c
index 4a57623c2..d8955832e 100644
--- a/lib/cobalt/timer.c
+++ b/lib/cobalt/timer.c
@@ -214,7 +214,13 @@ COBALT_IMPL(int, timer_gettime, (timer_t timerid, struct itimerspec *value))
 {
 	int ret;
 
-	ret = -XENOMAI_SYSCALL2(sc_cobalt_timer_gettime, timerid, value);
+#ifdef __USE_TIME_BITS64
+	long sc_nr = sc_cobalt_timer_gettime64;
+#else
+	long sc_nr = sc_cobalt_timer_gettime;
+#endif
+
+	ret = -XENOMAI_SYSCALL2(sc_nr, timerid, value);
 	if (ret == 0)
 		return 0;
 

-- 
2.39.2


  parent reply	other threads:[~2023-05-08  8:13 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-08  8:13 [PATCH 00/13] y2038: Part two - timer and timerfd support Florian Bezdeka
2023-05-08  8:13 ` [PATCH 01/13] y2038: cobalt: Introduce some itimerspec64 related helpers Florian Bezdeka
2023-05-12 15:59   ` Jan Kiszka
2023-05-15  9:31     ` Florian Bezdeka
2023-05-15  9:36       ` Jan Kiszka
2023-05-08  8:13 ` [PATCH 02/13] y2038: cobalt/posix/timer: Adding timer_settime64 Florian Bezdeka
2023-05-12 16:02   ` Jan Kiszka
2023-05-15  9:33     ` Florian Bezdeka
2023-05-08  8:13 ` [PATCH 03/13] y2038: lib/cobalt: Dispatch timer_settime Florian Bezdeka
2023-05-08  8:13 ` [PATCH 04/13] y2038: testsuite/smokey/y2038: Adding tests for timer_settime Florian Bezdeka
2023-05-08  8:13 ` [PATCH 05/13] y2038: cobalt/posix/timer: Adding timer_gettime64 Florian Bezdeka
2023-05-08  8:13 ` Florian Bezdeka [this message]
2023-05-08  8:13 ` [PATCH 07/13] y2038: testsuite/smokey/y2038: Adding tests for timer_gettime Florian Bezdeka
2023-05-08  8:13 ` [PATCH 08/13] y2038: cobalt/posix/timerfd: Adding timerfd_settime64 Florian Bezdeka
2023-05-08  8:13 ` [PATCH 09/13] y2038: lib/cobalt: Dispatch timerfd_settime Florian Bezdeka
2023-05-08  8:13 ` [PATCH 10/13] y2038: testsuite/smokey/y2038: Adding tests for timerfd_settime Florian Bezdeka
2023-05-08  8:13 ` [PATCH 11/13] y2038: cobalt/posix/timerfd: Adding timerfd_gettime64 Florian Bezdeka
2023-05-08  8:13 ` [PATCH 12/13] y2038: lib/cobalt: Dispatch timerfd_gettime Florian Bezdeka
2023-05-08  8:13 ` [PATCH 13/13] y2038: testsuite/smokey/y2038: Adding tests for timerfd_gettime Florian Bezdeka
2023-05-08 10:50   ` Lukasz Majewski
2023-05-08 11:45     ` Florian Bezdeka
2023-05-12 16:09 ` [PATCH 00/13] y2038: Part two - timer and timerfd support Jan Kiszka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230508-florian-y2038-part-two-v1-6-a417812fba85@siemens.com \
    --to=florian.bezdeka@siemens.com \
    --cc=jan.kiszka@siemens.com \
    --cc=xenomai@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).