interrupt_context_level(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… interrupt_context_level(9) πŸ’…

okay so first things first, this page lives in the Kernel API Manual (yes bestie, the kernel has lore and it's thick), and it's about one very specific little function. let's get into it 🫢


✨ NAME ✨

interrupt_context_level β€” literally just returns the interrupt context level. that's the whole job. she's an icon, she's a one-trick pony, and honestly? the pony ate. πŸ‘‘


🌸 SYNOPSIS 🌸

unsigned char interrupt_context_level (void );

look at her. unsigned char return type, void args, zero drama. no cap. πŸŽ€


πŸ¦‹ ARGUMENTS πŸ¦‹

  • void β€” no arguments, bestie. none. nada. she takes nothing from you, she just gives. main character energy fr fr πŸ’–

πŸ”₯ DESCRIPTION πŸ”₯

so the way this works is she returns the current interrupt context level β€” like a vibe check for where the CPU currently is in kernel-land. and the levels are:

  • 0 β€” normal context 🌈 (chill, everyday, nothing spicy happening)
  • 1 β€” softirq context ⭐ (deferred work, still kinda relaxed)
  • 2 β€” hardirq context πŸ”₯ (okay now we're in an actual hardware interrupt, be normal)
  • 3 β€” NMI context πŸ’€ (non-maskable interrupt, the final boss, absolutely no games being played)

that's it, that's the whole mapping. 0, 1, 2, 3 β€” memorize it, screenshot it, put it on your lock screen. iykyk ✨


🧚 SEE ALSO 🧚

like, if interrupt_context_level is the main character, these two are her besties showing up in the same friend group. go say hi. 🫢


ngl if you're poking around interrupt levels you should probably know what preemption is doing, so don't skip the SEE ALSO. that's your homework. πŸ™ˆ

and that's the page!! source vibes come straight from ./include/linux, dated October 2026 🌸 β€” mwah, go forth and check your context levels responsibly, bestie πŸ’…βœ¨πŸŽ€

πŸ“¦ where this page comes from