__exit_to_user_mode_prepare(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… __exit_to_user_mode_prepare(9) β€” Kernel API Manual ✨

okay so bestie, welcome to the Kernel API Manual, this one's the __exit_to_user_mode_prepare(9) page and it's lowkey one of those "pls don't touch this yourself" situations, iykyk 🫢


✨ NAME ✨

__exit_to_user_mode_prepare β€” call exit_to_user_mode_loop() if required πŸŽ€


🌸 SYNOPSIS 🌸

void __exit_to_user_mode_prepare (struct pt_regs *regs , const unsigned
long work_mask );

like, that's the whole signature, no cap πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • regs β€” pointer to pt_regs on entry stack. yes the actual registers, iconic πŸ‘‘
  • work_mask β€” which TIF bits need to be evaluated. which ones? the mask tells you, we're not guessing here πŸ”₯

πŸ’– DESCRIPTION πŸ’–

bestie, it's a four-step little routine, and honestly the discipline? immaculate. here's the order, fr fr:

  1. check that interrupts are disabled ⭐
  2. call tick_nohz_user_enter_prepare πŸŽ€
  3. call exit_to_user_mode_loop if any flags from EXIT_TO_USER_MODE_WORK are set 🌈
  4. check that interrupts are still disabled again, because we stay paranoid πŸ’€
okay listen β€” don't invoke directly, use the syscall/irqentry_ prefixed variants below. literally the whole point. the variants are the main characters here, this one's the backstage crew πŸ™ˆ

πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./include/linux/irq-entry-common.h β€” go read it, it's giving source of truth πŸ“–

and the whole friend group, all of them, in order, mwah 🫢


and that's the page!! 🧚 from ./include/linux, dated October 2026, __exit_to_user_mode_prepare(9) β€” stay safe, don't call it directly, love u, bye πŸ’œπŸ“

πŸ“¦ where this page comes from