[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210329142612.GC20909@hoboy.vegasvil.org>
Date: Mon, 29 Mar 2021 07:26:12 -0700
From: Richard Cochran <richardcochran@...il.com>
To: Miroslav Lichvar <mlichvar@...hat.com>
Cc: Thomas Gleixner <tglx@...utronix.de>,
Daphne Preston-Kendall <dpk@...ceword.org>,
LKML <linux-kernel@...r.kernel.org>,
John Stultz <john.stultz@...aro.org>,
"Michael Kerrisk (man-pages)" <mtk.manpages@...il.com>
Subject: Re: [Bug 212265] New: clock_gettime(CLOCK_TAI, ...) should return an
error when TAI has not been configured
On Mon, Mar 29, 2021 at 11:16:48AM +0200, Miroslav Lichvar wrote:
> There are at least two issues with handling a zero offset as a special
> value. One is that zero could potentially be a valid value in distant
> future.
I not losing sleep over that, but
> The other is that the kernel updates the offset when a leap
> second is inserted/deleted even if the original offset is zero, so
> checking for zero (in the kernel or an application) works only until
> the first leap second after boot.
oh, I didn't think of that. I hate leap seconds. Good thing Earth is
picking up the pace again!
> The kernel would need to set a flag that the offset was set. Returning
> an error in clock_gettime() until the offset is set sounds reasonable
> to me, but I have no idea how many of the existing applications it
> would break.
I think it wiser to provide another way, sysfs or something else.
Thanks,
Richard
Powered by blists - more mailing lists