STRUCT K_ITIMER(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ‘‘ struct k_itimer(9) β€” the Kernel API Manual glow-up

okay bestie, sit down, hydrate, and get comfy, because we're talking about struct k_itimer from the Kernel API Manual (yes, the (9) section, we're fancy now πŸ’…). This is literally the POSIX.1b interval timer structure β€” the main character of the posix timer world. no cap.


✨ NAME ✨

struct k_itimer β€” the POSIX.1b interval timer structure. that's it, that's the vibe. πŸŽ€


🌸 SYNOPSIS 🌸

here's the whole thing, copied exactly, because we do not touch the source in this house:

struct k_itimer {
    struct hlist_node       t_hash;
    struct hlist_node       list;
    timer_t it_id;
    clockid_t it_clock;
    int it_sigev_notify;
    enum pid_type           it_pid_type;
    struct signal_struct    *it_signal;
    const struct k_clock    *kclock;
    spinlock_t it_lock;
    int it_status;
    bool it_sig_periodic;
    s64 it_overrun;
    s64 it_overrun_last;
    unsigned int            it_signal_seq;
    unsigned int            it_sigqueue_seq;
    ktime_t it_interval;
    struct hlist_node       ignored_list;
    union {
      struct pid              *it_pid;
      struct task_struct      *it_process;
    };
    struct sigqueue         sigq;
    rcuref_t rcuref;
    union {
      struct {
        struct hrtimer  timer;
      } real;
      struct cpu_timer        cpu;
      struct {
        struct alarm    alarmtimer;
      } alarm;
    } it;
    struct rcu_head         rcu;
 };

look at all those fields. she's got range. 🌈


πŸ¦‹ Members πŸ¦‹

time to meet the cast, one field at a time. no skipping, we love an exhaustive list here:

  • t_hash β€” entry in the posix timer hash table. she's indexed, she's findable, she's on the map πŸ—ΊοΈ
  • list β€” list node for binding the timer to tsk::signal::posix_timers. keeping the friend group together fr fr.
  • it_id β€” the posix timer id for identifying the timer. it's giving government-name realness πŸͺͺ
  • it_clock β€” the posix timer clock id. which clock is she on? that one. ⏰
  • it_sigev_notify β€” the notify word of sigevent struct for signal delivery. the "how do we tell you" field πŸ“£
  • it_pid_type β€” the type of the PID. gotta know what flavor of pid we're dealing with.
  • it_signal β€” pointer to the creator's signal struct. hi creator bestie 🫢
  • kclock β€” pointer to the k_clock struct handling this timer. the manager of the whole situation, lowkey iconic.
  • it_lock β€” lock protecting the timer. do not touch without the lock, that's the rule πŸ”’
  • it_status β€” the status of the timer. current mood: field-encoded πŸ’€
  • it_sig_periodic β€” the periodic status at signal delivery. is she repeating? this tells you.
  • it_overrun β€” the overrun counter for pending signals. the "oops we're behind" tally 😭
  • it_overrun_last β€” the overrun at the time of the last delivered signal. receipts from last time 🧾
  • it_signal_seq β€” sequence count to control signal delivery. numbers keep it orderly.
  • it_sigqueue_seq β€” the sequence count at the point where the signal was queued. timestamped-ish, snapshotted, slay ✨
  • it_interval β€” the interval for periodic timers. the again? how often? value πŸ”
  • ignored_list β€” list node for tracking ignored timers in tsk::signal::ignored_posix_timers. yes she has a whole separate list for the ignored ones. the way that's so real πŸ™ˆ
  • {unnamed_union} β€” anonymous. that's the whole description. anonymous. she's mysterious, she's unnamed, she's that girl πŸ•΅οΈβ€β™€οΈ
    • it_pid β€” the pid of the process/task targeted by the signal 🎯
    • it_process β€” the task to wakeup on clock_nanosleep (CPU timers). rise and shine bestie β˜€οΈ
  • sigq β€” embedded sigqueue. she brought her own queue, prepared queen πŸ‘‘
  • rcuref β€” reference count for life time management. literally keeping her alive 🫢
  • it β€” union representing the various posix timer type internals. all the internal lore in one union 🌈
  • rcu β€” RCU head for freeing the timer. the graceful-exit era, we love a clean teardown πŸ’œ

πŸ’– SEE ALSO πŸ’–

  • Kernel file ./include/linux/posix-timers.h
  • struct cpu_timer(9)

go read those, iykyk πŸ”₯


quick vibe check: every flag, field, and path above is exactly as it appears in the original β€” no invented behavior, no guessing, no drama we didn't source. the drama is editorial. πŸ’…

and that's the page, bestie!! πŸŽ€ this gem came out of ./include/linux, October 2026 edition β€” go off, kernel docs, periodt. β­πŸ’–

πŸ“¦ where this page comes from