On Sat, 21 Jan 2012, Poul-Henning Kamp wrote:

> >My question, though: if the offset is in TAI, and you have to
> >support "UTC", how do you get your leap second tables to do the
> >conversion?  
> 
> The reason for TAI is that way the kernel will not need the leapseconds
> only userland will.

The kernel will presumably have new system call interfaces using the new 
type.  For compatibility with existing binaries it will also need all the 
existing interfaces using the existing types with the same semantics as at 
present (for example, POSIX time_t as an arithmetic encoding of UTC 
broken-down times that is ambiguous around leap seconds) - and so will 
need a way to convert between the two.  Similarly, new filesystems may 
have an on-disk format using the new type for timestamps - so requiring a 
conversion to time_t when old stat() interfaces are called - but for old 
filesystems it will remain necessary to interpret on-disk timestamps in 
the same way they always were interpreted as time_t, meaning conversion 
code when a new interface is used with an old fileystem.  For all these 
conversions, a leapsecond table in the kernel (presumably provided by 
userspace to the kernel during the boot process, and updated as needed 
after boot, rather than compiled in).

If an interface like the proposed one had been used from the start then 
you could avoid kernel leapsecond tables - but in the real world of 
existing binaries, interfaces and on-disk formats with existing defined 
semantics, the kernel support is needed for backwards compatibility.

-- 
Joseph S. Myers
j...@polyomino.org.uk
_______________________________________________
LEAPSECS mailing list
LEAPSECS@leapsecond.com
http://six.pairlist.net/mailman/listinfo/leapsecs

Reply via email to