__exit_to_user_mode_prepare(9)
π
__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 topt_regson 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:
- check that interrupts are disabled β
- call
tick_nohz_user_enter_prepareπ - call
exit_to_user_mode_loopif any flags fromEXIT_TO_USER_MODE_WORKare set π - 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 π«Ά
arch_enter_from_user_mode(9)arch_in_rcu_eqs(9)enter_from_user_mode(9)arch_exit_to_user_mode_work(9)arch_exit_to_user_mode_prepare(9)arch_exit_to_user_mode(9)arch_do_signal_or_restart(9)syscall_exit_to_user_mode_prepare(9)irqentry_exit_to_user_mode_prepare(9)exit_to_user_mode(9)irqentry_enter_from_user_mode(9)irqentry_exit_to_user_mode(9)struct irqentry_state(9)irqentry_enter_from_kernel_mode(9)irqentry_exit_to_kernel_mode_preempt(9)irqentry_exit_to_kernel_mode_after_preempt(9)irqentry_exit_to_kernel_mode(9)irqentry_enter(9)irqentry_exit(9)irqentry_nmi_enter(9)irqentry_nmi_exit(9)
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
- 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