This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v9] y2038: Introduce the __ASSUME_TIME64_SYSCALLS define
- From: Zack Weinberg <zackw at panix dot com>
- To: Alistair Francis <alistair dot francis at wdc dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>, Lukasz Majewski <lukma at denx dot de>, Joseph Myers <joseph at codesourcery dot com>, Alistair Francis <alistair23 at gmail dot com>
- Date: Tue, 27 Aug 2019 15:03:31 -0400
- Subject: Re: [PATCH v9] y2038: Introduce the __ASSUME_TIME64_SYSCALLS define
- References: <20190827173015.24370-1-alistair.francis@wdc.com>
On Tue, Aug 27, 2019 at 1:35 PM Alistair Francis
<alistair.francis@wdc.com> wrote:
> From: Lukasz Majewski <lukma@denx.de>
...
Thanks for tackling this revision. I think it's much clearer now what
the flag means. I would like to suggest some further improvements to
the wording of the comment and the commit message.
The commit message is largely redundant to the comment. I think all
you need to say in the commit message is:
# Add __ASSUME_TIME64_SYSCALLS macro to linux/kernel-features.h.
#
# __ASSUME_TIME64_SYSCALLS will be defined (with value 1) if the Linux
# kernel can be assumed to provide a complete set of system calls that
# process 64-bit time_t.
#
# __ASSUME_TIME64_SYSCALLS does not indicate whether time_t is
# actually 64 bits (that's __TIMEBITS) and also does not indicate
# whether the 64-bit time_t system calls have "time64" suffixes on
# their names.
And then the comment should be something like this:
# /* Support for 64-bit time_t in the system call interface.
#
# This flag is always true for Linux 5.1 and later. Prior to that
# version, it is true only for some CPU architectures and ABIs:
#
# - __WORDSIZE == 64 - all supported architectures where pointers
# are 64 bits also have always had 64-bit time_t.
#
# - __WORDSIZE == 32 && __SYSCALL_WORDSIZE == 64 - this describes
# only one supported configuration, x86's 'x32' subarchitecture,
# where pointers are 32 bits but time_t has always been 64 bits.
#
# For architectures where __WORDSIZE == 32 && __SYSCALL_WORDSIZE != 64,
# glibc supports both 32-bit time_t (__TIMESIZE == 32) and 64-bit time_t
# (__TIMESIZE == 64). Independent of this, when __ASSUME_TIME64_SYSCALLS
# is defined, glibc uses only the 64-bit time_t system calls; conversions
# occur in user space. When __ASSUME_TIME64_SYSCALLS is *not* defined,
# glibc will attempt to use the 64-bit time_t system calls but will fall
# back to the 32-bit system calls if they are not available.
#
# Because of this, __ASSUME_TIME64_SYSCALLS being defined does not
# mean that __TIMESIZE is 64, and __TIMESIZE being equal to 64 does
# not mean that __ASSUME_TIME64_SYSCALLS is defined. All four
# cases are possible. */
I think that gets everything important. Neither the commit message
nor the comment needs to list all the new system calls.
zw