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

Dmitry V. Levin ldv at altlinux.org
Tue Mar 10 18:34:35 UTC 2020


On Tue, Mar 10, 2020 at 11:04:54AM -0700, Alistair Francis wrote:
> 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).

Sorry, I don't follow.  Isn't it either kernel_timespec64_t or
kernel_timespec32_t in every case?  Could you give an example where
it doesn't match neither kernel_timespec64_t nor kernel_timespec32_t?


-- 
ldv


More information about the Strace-devel mailing list