All of lore.kernel.org
 help / color / mirror / Atom feed
From: chensong <chensong@tj.kylinos.cn>
To: xenomai@xenomai.org, jan.kiszka@siemens.com, henning.schild@siemens.com
Subject: [PATCH 5/5] lib/cobalt/clock.c:dispatch clock_settime
Date: Tue,  3 Nov 2020 11:05:43 +0800	[thread overview]
Message-ID: <1604372743-2986-1-git-send-email-chensong@tj.kylinos.cn> (raw)

Regarding sizeof time_t, dispatch 32bit timespec to clock_settime
and 64bit timespec to clock_settime64.

Signed-off-by: chensong <chensong@tj.kylinos.cn>
---
 lib/cobalt/clock.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lib/cobalt/clock.c b/lib/cobalt/clock.c
index 11fd1aa..44b2f3f 100644
--- a/lib/cobalt/clock.c
+++ b/lib/cobalt/clock.c
@@ -237,7 +237,11 @@ COBALT_IMPL(int, clock_settime, (clockid_t clock_id, const struct timespec *tp))
 {
 	int ret;
 
-	ret = -XENOMAI_SYSCALL2(sc_cobalt_clock_settime, clock_id, tp);
+	if (sizeof(time_t) > 4)
+		ret = -XENOMAI_SYSCALL2(sc_cobalt_clock_settime64,
+					clock_id, tp);
+	else
+		ret = -XENOMAI_SYSCALL2(sc_cobalt_clock_settime, clock_id, tp);
 	if (ret) {
 		errno = ret;
 		return -1;
-- 
2.7.4





             reply	other threads:[~2020-11-03  3:05 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-03  3:05 chensong [this message]
2020-11-10 10:24 ` [PATCH 5/5] lib/cobalt/clock.c:dispatch clock_settime Jan Kiszka
2020-11-11  3:55   ` chensong
2020-11-11  7:29     ` Jan Kiszka
2020-11-11  9:23       ` chensong
2020-11-11  9:43         ` Jan Kiszka
2020-11-11 10:13           ` chensong
2020-11-13 11:47             ` Florian Bezdeka
2020-11-13 11:56               ` Jan Kiszka
2020-11-13 11:59                 ` [PATCH 0/3] Make offered kernel features accessible during florian.bezdeka
2020-11-13 12:00                   ` [PATCH 1/3] cobalt uapi: Introducing new feature flag for settime64 availability florian.bezdeka
2020-11-13 13:25                     ` Jan Kiszka
2020-11-13 16:18                       ` florian.bezdeka
2020-11-14  7:33                         ` Jan Kiszka
2020-11-14  6:57                     ` song
2020-11-14  7:32                       ` Jan Kiszka
2020-11-14  7:50                         ` song
2020-11-16 14:07                           ` [PATCH v2 0/3] Make offered kernel features accessible during florian.bezdeka
2020-11-16 14:07                             ` [PATCH v2 1/3] lib/cobalt: Rename cobalt_check_features to cobalt_arch_check_features florian.bezdeka
2020-11-16 14:07                             ` [PATCH v2 3/3] cobalt uapi: Introducing new feature flag for time64 availability florian.bezdeka
2020-12-11  6:41                               ` Jan Kiszka
2020-11-16 14:07                             ` [PATCH v2 2/3] lib/cobalt: Introduce generic feature initialization and check API florian.bezdeka
2020-11-17  4:31                               ` song
2020-11-17  8:29                                 ` florian.bezdeka
2020-11-17  8:43                                   ` song
2020-11-17 14:28                               ` Jan Kiszka
2020-11-13 12:00                   ` [PATCH 2/3] lib/cobalt: Rename cobalt_check_features to cobalt_arch_check_features florian.bezdeka
2020-11-13 12:00                   ` [PATCH 3/3] lib/cobalt: Introduce generic feature initialization and check API florian.bezdeka
2020-11-13 13:25                     ` Jan Kiszka
2020-11-13 16:10                       ` florian.bezdeka
2020-11-14  7:04               ` [PATCH 5/5] lib/cobalt/clock.c:dispatch clock_settime song

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=1604372743-2986-1-git-send-email-chensong@tj.kylinos.cn \
    --to=chensong@tj.kylinos.cn \
    --cc=henning.schild@siemens.com \
    --cc=jan.kiszka@siemens.com \
    --cc=xenomai@xenomai.org \
    /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 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.