Re: [patch 07/12] alarmtimer: Provide alarmtimer_start()
From: John Stultz
Date: Tue Apr 07 2026 - 16:23:32 EST
On Tue, Apr 7, 2026 at 1:54 AM Thomas Gleixner <tglx@xxxxxxxxxx> wrote:
>
> Alarm timers utilize hrtimers for normal operation and only switch to the
> RTC on suspend. In order to catch already expired timers early and without
> going through a timer interrupt cycle, provide a new start function which
> internally uses hrtimer_start_range_ns_user().
>
> If hrtimer_start_range_ns_user() detects an already expired timer, it does
> not queue it. In that case remove the timer from the alarm base as well.
>
> Return the status queued or not back to the caller to handle the early
> expiry.
>
> Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxx>
> Cc: John Stultz <jstultz@xxxxxxxxxx>
> Cc: Stephen Boyd <sboyd@xxxxxxxxxx>
Acked-by: John Stultz <jstultz@xxxxxxxxxx> (also with Peter's
suggested name change)