STRUCT IRQACTION(9)
π struct irqaction(9) π
ok so this is the Kernel API Manual page for struct irqaction and bestie, it's literally the per-interrupt action descriptor, no cap. like every single thing you ever wanted to know about one interrupt action lives in this one struct. let's get into it β¨
πΈ SYNOPSIS πΈ
here's the whole vibe, copied exactly because i would NEVER mess with your code:
struct irqaction {
irq_handler_t handler;
union {
void *dev_id;
void __percpu *percpu_dev_id;
};
const struct cpumask *affinity;
struct irqaction *next;
irq_handler_t thread_fn;
struct task_struct *thread;
struct irqaction *secondary;
unsigned int irq;
unsigned int flags;
unsigned long thread_flags;
unsigned long thread_mask;
const char *name;
struct proc_dir_entry *dir;
};
π Members π
okay so here's the member-by-member breakdown, and yes i'm gonna hype each one up because they all matter π
handlerβ the interrupt handler function. this is the main character, the one who actually does the thing π₯{unnamed_union}β it's anonymous. no name. mysterious. iconic. it's giving mystery box energy πdev_idβ cookie to identify the device πͺ (fr fr, the manpage calls it a cookie)percpu_dev_idβ cookie to identify the device, but per-CPU this time πͺβ¨affinityβ CPUs this irqaction is allowed to run on. it's the VIP list, and the guest list is CPUs πnextβ pointer to the next irqaction for shared interrupts. chain of besties π«Άthread_fnβ interrupt handler function for threaded interrupts, the threaded sibling ofhandlerπ§΅threadβ thread pointer for threaded interrupts. it points at the thread, that's the whole job πsecondaryβ pointer to secondary irqaction (force threading). dramatic name, real purpose πirqβ interrupt number π’flagsβ flags (seeIRQF_*above). go look up top, i'm not making stuff up πthread_flagsβ flags related to thread π³οΈthread_maskβ bitmask for keeping track of thread activity. lowkey the accountant of the struct πnameβ name of the device. everyone needs a name bestie πdirβ pointer to theproc/irq/NN/nameentry. yes, that exact path, don't @ me π
π SEE ALSO π
- Kernel file
./include/linux/interrupt.h request_irq(9)struct irq_affinity_notify(9)struct irq_affinity(9)struct irq_affinity_desc(9)irq_update_affinity_hint(9)irq_set_affinity_and_hint(9)
like, read those next, they're in the same friend group i promise π¦
β little sign-off star: this page lives in ./include/linux, it's dated October 2026, and it's part of the Kernel API Manual. now go forth and slay your interrupts ππ
π¦ 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