STRUCT K_ITIMER(9)
π 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 totsk::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 ofsigeventstruct 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 thek_clockstruct 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 intsk::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 onclock_nanosleep(CPU timers). rise and shine bestie βοΈ
sigqβ embeddedsigqueue. 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
- 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