[PATCH v4 3/8] timespec32: Rename to old_timespec32

Alistair Francis alistair23 at gmail.com
Tue Mar 10 18:04:54 UTC 2020


On Mon, Mar 9, 2020 at 6:44 PM Dmitry V. Levin <ldv at altlinux.org> wrote:
>
> On Mon, Mar 09, 2020 at 05:42:59PM -0700, Alistair Francis wrote:
> > The Linux kernel calls the 32-bit timespec struct old_timespec32, so
> > let's rename it to be clear.
>
> I don't find old_timespec32 any more clear than timespec32, sorry.
> Why add a prefix when the suffix is quite descriptive already?

The main reason is just to be explicitly clear.

There are three timespecs in the Linux kernel:
 - timespec64 - include/linux/time64.h
    - This one gives a 64-bit version for all systems
 - old_timespec32 - include/linux/time64.h
    - This is only used on old 32-bit systems (with *_time32 syscalls)
 - timespec - include/uapi/linux/time.h
    - This is used for some syscalls (as seen in this series).
    - On 32-bit systems this is a 32-bit value (no matter what size
time_t is) so it can be confused with the current strace timespec32
(although it's not the same).

>
> It's up to kernel people to rename their internal structures as they
> please, but we don't have to follow.

Ok. I just feel that this makes it clearer what each one is for (and
why we have 3).

Alistair

>
>
> --
> ldv


More information about the Strace-devel mailing list