public inbox for glibc-cvs@sourceware.org help / color / mirror / Atom feed
From: Lukasz Majewski <lukma@sourceware.org> To: glibc-cvs@sourceware.org Subject: [glibc] timer: Decouple x86_64 specific timer_settime from generic Linux implementation Date: Thu, 05 Dec 2019 23:41:00 -0000 [thread overview] Message-ID: <20191205234105.75894.qmail@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=ab65136e7233183a1f35c7d36867b5937844b368 commit ab65136e7233183a1f35c7d36867b5937844b368 Author: Lukasz Majewski <lukma@denx.de> Date: Fri Nov 8 11:13:56 2019 +0100 timer: Decouple x86_64 specific timer_settime from generic Linux implementation The x86_64 specific timer_settime implementation (from ./linux/x86_64/timer_settime.c) reused the Linux generic one (from ./linux/timer_settime.c) to implement handling some compatible timers (previously defined in librt, now in libc). As the generic implementation now is going to also support new (available from Linux 5.1+) timer_settime64 syscall, those two implementations have been decoupled for easier conversion. The original INLINE_SYSCALL() macro has been replaced with INLINE_SYSCALL_CALL() to avoid explicit passing the number of arguments. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org> Diff: --- sysdeps/unix/sysv/linux/timer_settime.c | 7 ------- sysdeps/unix/sysv/linux/x86_64/timer_settime.c | 14 ++++++++++---- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/sysdeps/unix/sysv/linux/timer_settime.c b/sysdeps/unix/sysv/linux/timer_settime.c index a8350ae..51f2420 100644 --- a/sysdeps/unix/sysv/linux/timer_settime.c +++ b/sysdeps/unix/sysv/linux/timer_settime.c @@ -22,17 +22,10 @@ #include <sysdep.h> #include "kernel-posix-timers.h" - -#ifdef timer_settime_alias -# define timer_settime timer_settime_alias -#endif - - int timer_settime (timer_t timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue) { -#undef timer_settime struct timer *kt = (struct timer *) timerid; /* Delete the kernel timer object. */ diff --git a/sysdeps/unix/sysv/linux/x86_64/timer_settime.c b/sysdeps/unix/sysv/linux/x86_64/timer_settime.c index ea8978d..4ed92e9 100644 --- a/sysdeps/unix/sysv/linux/x86_64/timer_settime.c +++ b/sysdeps/unix/sysv/linux/x86_64/timer_settime.c @@ -17,13 +17,19 @@ not, see <https://www.gnu.org/licenses/>. */ #include <shlib-compat.h> +#include <sysdep.h> +#include "kernel-posix-timers.h" #include "compat-timer.h" +int +__timer_settime_new (timer_t timerid, int flags, const struct itimerspec *value, + struct itimerspec *ovalue) +{ + struct timer *kt = (struct timer *) timerid; -#define timer_settime_alias __timer_settime_new -#include <sysdeps/unix/sysv/linux/timer_settime.c> - -#undef timer_settime + return INLINE_SYSCALL_CALL (timer_settime, kt->ktimerid, flags, value, + ovalue); +} versioned_symbol (librt, __timer_settime_new, timer_settime, GLIBC_2_3_3);
reply other threads:[~2019-12-05 23:41 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20191205234105.75894.qmail@sourceware.org \ --to=lukma@sourceware.org \ --cc=glibc-cvs@sourceware.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: linkBe 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 read-only IMAP folder(s) and NNTP newsgroup(s).