This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
Hi Arnd, > On Sat, Jan 18, 2020 at 11:48 PM Alistair Francis > <alistair23@gmail.com> wrote: > > > > On Sat, Jan 18, 2020 at 5:21 PM Lukasz Majewski <lukma@denx.de> > > wrote: > > > > > > This type is a glibc's "internal" type similar to struct timeval > > > but whose tv_sec field is a __time64_t rather than a time_t, > > > which makes it Y2038-proof. This struct is NOT supposed to be > > > passed to the kernel - instead it shall be converted to struct > > > __timespec64 and clock_[sg]ettime syscalls shall be used (which > > > are now Y2038 safe). > > > > > > Build tests: > > > ./src/scripts/build-many-glibcs.py glibcs > > > > Looks good, I have the same thing in my tree :) > > I think it's slightly different: __suseconds_t on rv32 is 64 bit > wide, while on all existing 32-bit architectures as well as sparc64 > it is 32-bit wide. > > While almost all kernel interfaces based on timeval have been replaced > by those based on timespec, there are a small number that need this > to be compatible with the kernel's layout, or to have an explicit > conversion: > > - Socket timestamps with SO_TIMESTAMP > - Socket timeouts with SO_RCVTIMEO/SO_SNDTIMEO > - pc-style parallel ports with the PPGETTIME/PPSETTIME ioctls > - video4linux with the VIDIOC_QUERYBUF/VIDIOC_QBUF/VIDIOC_DQBUF > VIDIOC_PREPARE_BUF and VIDIOC_OMAP3ISP_STAT_REQ ioctls > > Arnd I've kept the __suseconds_t type from the original definition of struct timeval. Moreover, as I've noted in the commit message - the struct __timeval64 is NOT supposed to be passed directly to Linux kernel and shall be explicitly converted if needed (thanks Arnd for pointing out exact situations where conversion will be needed). Or maybe somebody has better idea? Comments are more than welcome. Best regards, Lukasz Majewski -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de
Attachment:
pgpQhzQpcmnJX.pgp
Description: OpenPGP digital signature
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |