Re: GPS Leap Second Scheduled!

Oliver Xymoron (oxymoron@waste.org)
Thu, 10 Sep 1998 12:05:25 -0500 (CDT)


On Thu, 10 Sep 1998, Rogier Wolff wrote:

> Chris Wedgwood wrote:
> > On Wed, Sep 09, 1998 at 02:13:42PM -0600, Colin Plumb wrote:
> >
> > > - gettimeofday() never returns the same value twice (documented BSD
> > > behaviour)
> >
> > Ouch... gettimeofday(2) only presently has usec resolution. I suspect
> > we can make this report the same value twice on really high end boxes
> > (667MHz Alpha maybe, 400Mhz Sparcs?), if not now, in a year or so.
> > Even a P.ii 600 or so can probably manage it.
>
> This is defined behaviour. On processors where gettimeofday can be
> called more than once in a microsecond (SMP systems, and fast
> systems), the kernel is required to keep a last-time-returned, and
> increment it and return that if the value calculated is below the
> stored value.

Seems wrong to bother the kernel with this at all. Any complexity here
should be put in libc. After all, the problem is largely with the ANSI C
spec.

Also, putting any of this 'hide the leap second' logic in the kernel makes
it more difficult to later add a consistent interface to libc as the
information is now hidden in the kernel.

Finally, telling the kernel to schedule a leap second seems pretty ugly as
well.

--
 "Love the dolphins," she advised him. "Write by W.A.S.T.E.." 

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/faq.html