irqentry_exi...mode_preempt(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… irqentry_exi...mode_preempt(9) β€” from the Kernel API Manual, bestie ✨

okay so this is a page straight out of the Kernel API Manual, and it's about one very specific little function that handles the "we're going back to kernel mode, quick preempt check bestie" moment. it's short, it's precise, and it lowkey matters a lot. let's get into it 🫢


✨ NAME ✨

irqentry_exit_to_kernel_mode_preempt β€” literally "run preempt checks on return to kernel mode." that's the whole vibe. πŸ’…


🌸 SYNOPSIS 🌸

void irqentry_exit_to_kernel_mode_preempt (struct pt_regs *regs ,
irqentry_state_t state );

no cap, that's the whole signature. two args, no return value, very demure, very mindful. πŸŽ€


πŸ¦‹ ARGUMENTS πŸ¦‹

  • regs β€” pointer to current's pt_regs. like, the registers of whatever task is currently the main character. πŸ‘‘
  • state β€” the return value from the matching call to irqentry_enter_from_kernel_mode. you gotta keep that receipt, fr fr. 🧾

πŸ’– DESCRIPTION πŸ’–

so here's the tea: you invoke this before irqentry_exit_to_kernel_mode_after_preempt, and it's what allows kernel preemption on the return from an interrupt. it's giving "one step before the finale." ✨

it must be invoked with interrupts disabled, and with a CPU state that allows kernel preemption. both conditions, no exceptions. ⚠️

and after this function returns, the caller can modify CPU state before invoking irqentry_exit_to_kernel_mode_after_preempt β€” which is required to re-establish the tracing, lockdep and RCU state for returning to the interrupted context. so like, that second call isn't optional, bestie. it's the whole point. πŸ”₯


πŸ’œ SEE ALSO πŸ’œ

like, that's a whole friend group of functions right there. iykyk. 🌈


quick vibe check: interrupts disabled, CPU state preemption-friendly. don't skip the follow-up call. that's the rule. πŸ’€

and that's the page, bestie!! πŸ₯³ this one came from ./include/linux and it's dated October 2026, signed off with irqentry_exi...mode_preempt(9) β€” so if you ever see that truncated little name floating around, you'll know exactly what it means. slay, go forth, and preempt responsibly πŸ’…βœ¨πŸŽ€

πŸ“¦ where this page comes from