unofficial mirror of libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
To: GNU C Library <libc-alpha@sourceware.org>
Subject: Re: [PATCH 2/5] timer: Decouple x86_64 specific timer_gettime from generic Linux implementation
Date: Wed, 4 Dec 2019 16:41:36 -0300	[thread overview]
Message-ID: <12af0708-1e0b-7d47-bb95-a3fecf534c97@linaro.org> (raw)
In-Reply-To: <20191111214758.3677-3-lukma@denx.de>



On 11/11/2019 18:47, Lukasz Majewski wrote:
> The x86_64 specific timer_gettime implementation (from
> ./linux/x86_64/timer_gettime.c) reused the Linux generic one (from
> ./linux/timer_gettime.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_gettime64 syscall, those two implementations have
> been decoupled for easier conversion.

LGTM with a nit below.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>

> ---
>  sysdeps/unix/sysv/linux/timer_gettime.c        |  7 -------
>  sysdeps/unix/sysv/linux/x86_64/timer_gettime.c | 12 ++++++++----
>  2 files changed, 8 insertions(+), 11 deletions(-)
> 
> diff --git a/sysdeps/unix/sysv/linux/timer_gettime.c b/sysdeps/unix/sysv/linux/timer_gettime.c
> index 799e2c935e..8d9bef9196 100644
> --- a/sysdeps/unix/sysv/linux/timer_gettime.c
> +++ b/sysdeps/unix/sysv/linux/timer_gettime.c
> @@ -22,16 +22,9 @@
>  #include <sysdep.h>
>  #include "kernel-posix-timers.h"
>  
> -
> -#ifdef timer_gettime_alias
> -# define timer_gettime timer_gettime_alias
> -#endif
> -
> -
>  int
>  timer_gettime (timer_t timerid, struct itimerspec *value)
>  {
> -#undef timer_gettime
>    struct timer *kt = (struct timer *) timerid;
>  
>    /* Delete the kernel timer object.  */

Ok.

> diff --git a/sysdeps/unix/sysv/linux/x86_64/timer_gettime.c b/sysdeps/unix/sysv/linux/x86_64/timer_gettime.c
> index 54daee2f4c..5755cc44fb 100644
> --- a/sysdeps/unix/sysv/linux/x86_64/timer_gettime.c
> +++ b/sysdeps/unix/sysv/linux/x86_64/timer_gettime.c
> @@ -17,13 +17,17 @@
>     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_gettime_new (timer_t timerid, struct itimerspec *value)
> +{
> +  struct timer *kt = (struct timer *) timerid;
>  
> -#define timer_gettime_alias __timer_gettime_new
> -#include <sysdeps/unix/sysv/linux/timer_gettime.c>
> -
> -#undef timer_gettime
> +  return INLINE_SYSCALL (timer_gettime, 2, kt->ktimerid, value);

Use INLINE_SYSCALL_CALL.

> +}
>  versioned_symbol (librt, __timer_gettime_new, timer_gettime, GLIBC_2_3_3);
>  
>  
>

  parent reply	other threads:[~2019-12-04 19:41 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-11 21:47 [PATCH 0/5] y2038: linux: timer_[sg]ettime conversion to 64 bit time Lukasz Majewski
2019-11-11 21:47 ` [PATCH 1/5] time: Introduce glibc's internal struct __itimerspec64 Lukasz Majewski
2019-11-27 16:59   ` Lukasz Majewski
2019-12-04 19:41   ` Adhemerval Zanella
2019-11-11 21:47 ` [PATCH 2/5] timer: Decouple x86_64 specific timer_gettime from generic Linux implementation Lukasz Majewski
2019-11-27 16:59   ` Lukasz Majewski
2019-12-04 19:41   ` Adhemerval Zanella [this message]
2019-11-11 21:47 ` [PATCH 3/5] timer: Decouple x86_64 specific timer_settime " Lukasz Majewski
2019-11-27 16:59   ` Lukasz Majewski
2019-12-04 19:41   ` Adhemerval Zanella
2019-11-11 21:47 ` [PATCH 4/5] y2038: linux: Provide __timer_gettime64 implementation Lukasz Majewski
2019-11-27 17:00   ` Lukasz Majewski
2019-12-04 19:41   ` Adhemerval Zanella
2019-12-05  9:42     ` Lukasz Majewski
2019-12-11 17:51   ` Andreas Schwab
2019-12-11 22:26     ` Lukasz Majewski
2019-12-12 15:26       ` Andreas Schwab
2019-12-12 15:33         ` Lukasz Majewski
2019-12-12 15:46           ` Andreas Schwab
2019-12-12 16:05             ` Lukasz Majewski
2019-12-12 16:08               ` Andreas Schwab
2019-11-11 21:47 ` [PATCH 5/5] y2038: linux: Provide __timer_settime64 implementation Lukasz Majewski
2019-11-27 17:00   ` Lukasz Majewski
2019-12-04 19:41   ` Adhemerval Zanella
2019-11-18 22:00 ` [PATCH 0/5] y2038: linux: timer_[sg]ettime conversion to 64 bit time Lukasz Majewski
2019-11-25  8:34   ` Lukasz Majewski

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

  List information: https://www.gnu.org/software/libc/involved.html

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

  git send-email \
    --in-reply-to=12af0708-1e0b-7d47-bb95-a3fecf534c97@linaro.org \
    --to=adhemerval.zanella@linaro.org \
    --cc=libc-alpha@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: 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 read-only IMAP folder(s) and NNTP newsgroup(s).