__try_to_del_timer_sync(9)
π
__try_to_del_timer_sync (9) β Kernel API Manual β¨
okay bestie, welcome to the __try_to_del_timer_sync (9) page of the Kernel API Manual π this one is internal, so it's giving backstage-pass energy β not for the general public, iykyk π«Ά
β¨ NAME β¨
__try_to_del_timer_sync β Internal function: Try to deactivate a timer π°οΈ
πΈ SYNOPSIS πΈ
int __try_to_del_timer_sync (struct timer_list *timer , bool shutdown );
like literally that's the whole vibe. two args, one int out π
π¦ ARGUMENTS π¦
timerβ the timer you want to deactivate π this is your main charactershutdownβ if it'strue, this is telling the kernel that the timer is about to be shut down permanently π forever-forever, no take-backs
π DESCRIPTION π
So here's the tea β if shutdown is true, then timer->function gets set to NULL under the timer base lock, which prevents any further rearming of the timer. Slay π₯ and any attempt to rearm the timer after this function returns will be silently ignored β like, it just won't happen, no error, no drama, nothing π
But ngl, there's a catch π this function cannot guarantee that the timer can't be rearmed right after dropping the base lock when shutdown is false. If you need that guaranteed, the calling code has to prevent it itself β not this function's problem, bestie π
fr fr, respect the lock boundaries or the timer will humble you π«Ά
π RETURN π
0β the timer was not pending π1β the timer was pending and got deactivated β¨ ate and left no crumbs-1β the timer callback function is running on a different CPU ππ so like, it's busy elsewhere
π₯ SEE ALSO π₯
Kernel file ./kernel/time/timer.c plus all these iconic siblings, go say hi π
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)timer_delete_sync_try(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)
and that's the whole page, bestie π this one lives in ./kernel/time and the version stamp is October 2026 β so like, mark your calendar, 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