STRUCT ALARM_BASE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct alarm_base(9) πŸ’…

okay bestie, buckle up β€” this one's from the Kernel API Manual, section 9, and it's giving "the actual skeleton of the alarm timer system". no cap, it's lowkey iconic. πŸŽ€


✨ NAME ✨

struct alarm_base β€” the alarm timer bases, periodt. that's it, that's the whole vibe. πŸ”₯


🌸 SYNOPSIS 🌸

struct alarm_base {
    spinlock_t lock;
    struct timerqueue_head  timerqueue;
    ktime_t (*get_ktime)(void);
    void (*get_timespec)(struct timespec64 *tp);
    clockid_t base_clockid;
 };

like, look at her. five members. main character energy. πŸ‘‘


πŸ¦‹ Members πŸ¦‹

  • lock β€” the spinlock that keeps everything synchronized when people are touching the base at the same time. she's the bouncer at the door, fr fr. πŸ”’
  • timerqueue β€” a struct timerqueue_head that manages the actual list of events. this is where all the pending alarms are hanging out. πŸ’…
  • get_ktime β€” a function pointer that reads the time correlating to this base, and hands it back as a ktime_t. ✨
  • get_timespec β€” a function pointer that reads the namespace time correlating to the base, writing it into a struct timespec64 *tp. so yes, it returns via the pointer, don't @ me. 🫢
  • base_clockid β€” a clockid_t for the base. the clock identity. her little name tag. πŸŽ€

πŸ‘‘ SEE ALSO πŸ‘‘

the kernel file lives at ./kernel/time/alarmtimer.c, and honestly the whole friend group is here. all of these, no skips:


ok that's the whole page, bestie. go read your timers. πŸ§šπŸ’œ

and for the cute sign-off: this lil beauty comes from ./kernel/time, dated October 2026 β€” so go forth and alarm, queen. πŸŒˆβ­πŸ“

πŸ“¦ where this page comes from