hrtimer_forward(9)
π hrtimer_forward(9) β the kernel API manual, but make it make sense π
okay bestie, so this is hrtimer_forward from the Kernel API Manual. it's giving "tiny function, big consequences," and honestly? we're obsessed. let's get into it β¨
πΈ NAME πΈ
hrtimer_forward β forward the timer expiry π°οΈ
like, literally move the expiry forward. that's the whole vibe. no cap.
π SYNOPSIS π
u64 hrtimer_forward (struct hrtimer *timer , ktime_t now , ktime_t
interval );
that's it, that's the signature. three args, one u64 coming back at you π
π¦ ARGUMENTS π¦
timerβ the hrtimer you're forwarding, bestie. the actual timer object. it's the main character here πnowβ forward past this time. so like, "hey, we're at this point now, everything before here is old news" β°intervalβ the interval you're forwarding by. the step size. the amount you're yeeting the expiry forward π
π§ DESCRIPTION π§
Forward the timer expiry so it will expire in the future. yes queen, push it forward so it's not expiring in the past, because expiring in the past is so last season π
NOTE: β οΈ This only updates the timer expiry value and does not requeue the timer.
read that again, fr fr. it updates the value and that is ALL. it does not requeue the timer. do not come for me if you expected it to requeue, because it did not requeue. i said what i said π
There is also a variant of this function: hrtimer_forward_now. the little sibling. the remix. iykyk π
π CONTEXT π
Can be safely called from the callback function of timer. like, that's your safe space, go off bestie π«Ά
If called from other contexts, timer must neither be enqueued nor running the callback and the caller needs to take care of serialization. so like β outside the callback, the timer can't be enqueued, can't be running its callback, and you have to handle the serialization yourself. no hand-holding, no autopilot. you're on your own for that part ππ
β RETURN β
The number of overruns are returned.
so the u64 is a whole count of how many overruns happened. not zero-or-error, not a bool β an actual number. she's quantitative, she's detailed, she ate π₯
π₯ SEE ALSO π₯
Kernel file ./kernel/time/hrtimer.c β plus the whole friend group:
hrtimer_update_function(9)hrtimer_start_range_ns(9)hrtimer_start_range_ns_user(9)hrtimer_try_to_cancel(9)hrtimer_cancel(9)__hrtimer_get_remaining(9)hrtimer_get_next_event(9)hrtimer_next_event_without(9)hrtimer_setup(9)hrtimer_setup_on_stack(9)hrtimer_sleeper_start_expires(9)hrtimer_setup_sleeper_on_stack(9)
go read them, they're all icons in their own right πβ¨
π okay that's the whole page, nothing skipped, nothing invented. source location is ./kernel/time, and this was dated October 2026 β so like, mark your calendars, this manual page is from the future, main character energy only πΈπ¦π
stay hydrated and don't forget to requeue your timers manually, bestie π π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms