Re: [patch 01/24] timekeeping: Provide ktime_get_snapshot_id()

From
Thomas Gleixner <tglx@kernel.org>
Date
2026-05-27 15:58:48
Also in
kvmarm, linux-sound, linux-wireless, lkml, netdev
Reply to
Jacob Keller, 2026-05-26
On Tue, May 26 2026 at 14:41, Jacob Keller wrote:
On 5/26/2026 10:13 AM, Thomas Gleixner wrote:
quoted
-void ktime_get_snapshot(struct system_time_snapshot *systime_snapshot)
+bool ktime_get_snapshot_id(struct system_time_snapshot *systime_snapshot, clockid_t clock_id)
 {
Since this function now returns a bool would it make sense to add a
"Return:" comment to the kdoc to help explain what the return value means?

I saw that you have a WARN_ON with the ktime_get_snapshot wrapper. I
guess it returns false if timekeeping_suspended.
...
This warns here, and the wrapper ktime_get_snapshot also warns. Does
that make sense? I guess eventually the ktime_get_snapshot will be removed?
No it does not and it's a leftover from an early version. I later
switched to have a valid bit in the struct because otherwise I'd need to
modify a gazillion call sites to propagate the return value through.

Let me remove it.

Thanks,

        tglx
Thread (86 messages) 86 messages, 9 authors, last reply 2026-07-06
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help