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]

Re: [RFC v6 04/23] linux: Use 32-bit time_t for itimerval


On Fri, 17 Jan 2020, Alistair Francis wrote:

> So basically follow the other implementations (or the link directly
> above) and add a __getitimer64/__setitimer64 function and a wrapper
> __getitimer/__setitimer for the current 32-bit time_t.

Yes.

We are in the middle of a very long series of patches - maybe ending up as 
hundreds of patches - that *prepare* for adding support for _TIME_BITS=64.  
None of those patches actually contain any _TIME_BITS or __USE_TIME_BITS64 
conditionals, because it's important that users of glibc get a consistent 
API (we don't want an intermediate state where defining _TIME_BITS=64 
gives users a broken interface where different functions have different 
notions of time_t, for example).  But new patches relating to 64-bit times 
should be consistent with the design of support for 64-bit time on systems 
that currently use 32-bit time.  And that means having a main function 
that uses 64-bit times in its interface, and on systems with 32-bit time, 
a thin wrapper that converts 32-bit times to 64-bit.

This design becomes particularly important when we get to functions that 
involve hundreds of lines of glibc code rather than thin wrappers round 
syscalls - for example, some pthreads functions.

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]