From: Roland McGrath <roland@hack.frob.com>
To: Adhemerval Zanella <azanella@linux.vnet.ibm.com>
Cc: "GNU C. Library" <libc-alpha@sourceware.org>,
Stefani Seibold <stefani@seibold.net>
Subject: Re: [PATCH v2] Add x86 32 bit vDSO time function support
Date: Wed, 09 Jul 2014 20:02:00 -0000 [thread overview]
Message-ID: <20140709200243.EA54A2C39A9@topped-with-meat.com> (raw)
In-Reply-To: Adhemerval Zanella's message of Sunday, 29 June 2014 12:57:09 -0300 <53B03755.6030600@linux.vnet.ibm.com>
> * sysdeps/unix/sysv/linux/x86_64/Makefile [sysdep_routing]: Move
> dl-vdso rule to ...
> * sysdeps/unix/sysv/linux/x86/Makefile [sysdep_routines]: ... here.
Typo: s/routing/routines/. Also, [] is for identifying conditional
sections (if* in makefiles, #if* in C). Use () for identifying the entity
being changed. Also, there is no rule here. It's just appending it to the
list (or not). I would have written:
* sysdeps/unix/sysv/linux/x86/Makefile [$(subdir) = elf]
(sysdep_routines): Add dl-vdso here, ...
* sysdeps/unix/sysv/linux/x86_64/Makefile [$(subdir) = elf]
(sysdep_routines): ... not here.
> * sysdeps/unix/sysv/linux/x86/gettimeofday.c: ... here. Also added
Two spaces between sentences.
> * sysdeps/unix/sysv/linux/x86/time.c: ... here. Also refactored to
And here.
> --- /dev/null
> +++ b/sysdeps/unix/sysv/linux/i386/gettimeofday.c
> @@ -0,0 +1,34 @@
> +/* Copyright (C) 2014 Free Software Foundation, Inc.
Still needs a top-line descriptive comment.
> +# define GETTIMEOFAY_FALLBACK (void*) &__gettimeofday_syscall
Put parens around the rhs so it's a single syntactic unit.
> +++ b/sysdeps/unix/sysv/linux/i386/time.c
> @@ -0,0 +1,34 @@
> +/* time implementation call for Linux/i386.
/* time -- Get number of seconds since Epoch. Linux/i386 version.
> --- /dev/null
> +++ b/sysdeps/unix/sysv/linux/x86/clock_gettime.c
> @@ -0,0 +1,38 @@
> +/* clock_gettime implementation call for Linux/x86.
/* Get the current value of a clock. Linux/x86 version.
(Here I copied the description from the stub file rt/clock_gettime.c.)
> --- /dev/null
> +++ b/sysdeps/unix/sysv/linux/x86/gettimeofday.c
> @@ -0,0 +1,57 @@
> +/* Copyright (C) 2014 Free Software Foundation, Inc.
Still needs a top-line descriptive comment.
> --- /dev/null
> +++ b/sysdeps/unix/sysv/linux/x86/time.c
> @@ -0,0 +1,52 @@
> +/* Copyright (C) 2014 Free Software Foundation, Inc.
Still needs a top-line descriptive comment.
> --- /dev/null
> +++ b/sysdeps/unix/sysv/linux/x86/timespec_get.c
> @@ -0,0 +1,28 @@
> +/* timespec_get implementation call for Linux/x86.
This is not a sensical English sentence fragment.
I think you meant "timespec_get call implementation".
But that's not actually descriptive.
> +#ifdef SHARED
> +# define INTERNAL_GETTIME(id, tp) \
> + ({ long int (*f) (clockid_t, struct timespec *) = __vdso_clock_gettime; \
> + PTR_DEMANGLE (f); \
> + f (id, tp); })
Why isn't this just an inline function? If it had to be a macro, it should
have line breaks around ({ and }) to be more readable. Either way, it
should use (*f) (...) to call via the function pointer.
You didn't mention what testing you did. For this sort of change, it is
important to test (and report about it) for more than one kernel version,
including at least one and one without the vDSO support that this code
should use but not rely on.
I tend to think this is getting a bit close to freeze time for a
substantial semantic change like this one. But I'll defer that paranoia to
others, and if the folks here who are distro package maintainers are not
worried about it then I won't object.
Thanks,
Roland
next prev parent reply other threads:[~2014-07-09 20:02 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-27 21:21 Adhemerval Zanella
2014-06-27 21:58 ` Roland McGrath
2014-06-29 15:57 ` Adhemerval Zanella
2014-07-07 18:01 ` Adhemerval Zanella
2014-07-09 20:02 ` Roland McGrath [this message]
2014-07-10 14:33 ` Adhemerval Zanella
2014-07-22 17:32 ` Adhemerval Zanella
2014-07-23 0:40 ` Allan McRae
2014-07-23 13:56 ` Adhemerval Zanella
2014-09-10 14:20 ` Adhemerval Zanella
2014-09-22 15:01 ` Adhemerval Zanella
2014-10-07 6:57 ` Stefani Seibold
2014-10-08 21:56 ` Roland McGrath
2014-10-08 22:02 ` Adhemerval Zanella
2014-10-08 22:15 ` Roland McGrath
2014-10-08 22:31 ` Adhemerval Zanella
2014-08-02 16:48 ` Mike Frysinger
2014-10-09 18:31 Adhemerval Zanella
2014-10-09 20:50 ` Nathan Lynch
2014-11-03 20:30 ` Adhemerval Zanella
2014-11-03 21:42 ` Adhemerval Zanella
2014-11-03 23:51 ` Nathan Lynch
2014-11-05 12:51 ` Adhemerval Zanella
2014-11-05 16:22 ` Nathan Lynch
2014-11-14 19:19 ` Adhemerval Zanella
2014-11-27 17:38 ` Adhemerval Zanella
2014-11-19 7:53 Stefani Seibold
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=20140709200243.EA54A2C39A9@topped-with-meat.com \
--to=roland@hack.frob.com \
--cc=azanella@linux.vnet.ibm.com \
--cc=libc-alpha@sourceware.org \
--cc=stefani@seibold.net \
/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).