STRUCT IRQACTION(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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 of handler 🧡
  • 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 (see IRQF_* 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 the proc/irq/NN/name entry. yes, that exact path, don't @ me πŸ“

πŸ‘‘ SEE ALSO πŸ‘‘

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