[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <s5h7fdnr0s0.wl-tiwai@suse.de>
Date: Fri, 17 Jun 2016 22:57:51 +0200
From: Takashi Iwai <tiwai@...e.de>
To: "Arnd Bergmann" <arnd@...db.de>
Cc: "Jaroslav Kysela" <perex@...ex.cz>, <alsa-devel@...a-project.org>,
<y2038@...ts.linaro.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] ALSA: seq_timer: use monotonic times internally
On Fri, 17 Jun 2016 17:10:32 +0200,
Arnd Bergmann wrote:
>
> The sequencer client manager reports timestamps in units of unsigned
> 32-bit seconds/nanoseconds, but that does not suffer from the y2038
> overflow because it stores only the delta since the 'last_update'
> time was recorded.
>
> However, the use of the do_gettimeofday() function is problematic
> and we have to replace it to avoid the overflow on on 32-bit
> architectures.
>
> This uses 'struct timespec64' to record 'last_update', and changes
> the code to use monotonic timestamps that do not suffer from leap
> seconds and settimeofday updates.
>
> As a side-effect, the code can now use the timespec64_sub() helper
> and become more readable and also avoid a multiplication to convert
> from microseconds to nanoseconds.
>
> Signed-off-by: Arnd Bergmann <arnd@...db.de>
Thanks, applied. It's even a nice cleanup!
Takashi
Powered by blists - more mailing lists