timer_delete_sync_try(9)
π timer_delete_sync_try β the Kernel API Manual tea π«Ά
okay so bestie, welcome to the kernel API manual for timer_delete_sync_try(9) β yes the whole page, sit down, it's not that long, and it's kind of iconic ngl β¨
πΈ NAME πΈ
timer_delete_sync_try β try to deactivate a timer, like, attempt it, no promises π
β¨ SYNOPSIS β¨
int timer_delete_sync_try (struct timer_list *timer );
literally one argument, we love a low-effort king π
π ARGUMENTS π
timerβ theTimer to deactivate. that's it. that's the whole vibe. it's the timer you're trying to shut down πΈ
π¦ DESCRIPTION π¦
okay so here's what it does: this function tries to deactivate a timer. emphasis on tries, bestie, it's in the name, read the room π
on success the timer is not queued, and the timer callback function is not running on any CPU. so like, timer's gone, callback's not vibing on any core, we're clean β¨
but like, lowkey important caveat: this function does not guarantee that the timer cannot be rearmed right after dropping the base lock. so if that's a problem for you, that's a you problem β it needs to be prevented by the calling code if necessary π no cap.
π₯ RETURN π₯
here's the vibe check, three possible outcomes:
0β The timer was not pending. nothing was happening, nothing to do, we move on π1β The timer was pending and deactivated. slay, we got it, it's done π-1β The timer callback function is running on a different CPU. not me, not my core, someone else is holding it, go ask them π
π SEE ALSO π
the whole friend group, gather round π«Ά β Kernel file ./kernel/time/timer.c struct timer_base(9), __round_jiffies_relative(9), round_jiffies(9), round_jiffies_relative(9), __round_jiffies_up_relative(9), round_jiffies_up(9), round_jiffies_up_relative(9), timer_init_key(9), mod_timer_pending(9), mod_timer(9), timer_reduce(9), add_timer(9), add_timer_local(9), add_timer_global(9), add_timer_on(9), __timer_delete(9), timer_delete(9), timer_shutdown(9), __try_to_del_timer_sync(9), __timer_delete_sync(9), timer_delete_sync(9), timer_shutdown_sync(9), fetch_next_timer_interrupt_remote(9), timer_unlock_remote_bases(9), timer_lock_remote_bases(9), timer_base_is_idle(9), timer_expire_remote(9), get_next_timer_interrupt(9), timer_base_try_to_set_idle(9), timer_clear_idle(9), __run_timers(9)
okay that's the whole page, you ate that π and now for the cute sign-off: this little masterpiece lives in ./kernel/time, dated October 2026, and it's filed under timer_delete_sync_try(9) β go forth and deactivate responsibly, mwah ππ§
π¦ 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