]> Projects (at) Tadryanom (dot) Me - AdrOS.git/commit
refactor: remove #if x86 guard from scheduler fork_child_trampoline
authorTulio A M Mendes <[email protected]>
Tue, 10 Feb 2026 05:53:40 +0000 (02:53 -0300)
committerTulio A M Mendes <[email protected]>
Tue, 10 Feb 2026 05:53:40 +0000 (02:53 -0300)
commit761b8e96ab68d5b6c7e430fbb9bdaccaaf02b15f
tree873613834420d6bba4931f8f2abae21b660a118d
parentc0a88a8652d761ca1e17b1a342266c96f21079db
refactor: remove #if x86 guard from scheduler fork_child_trampoline

Add hal_usermode_enter_regs() to the HAL usermode interface so
fork_child_trampoline() can call it generically without #if x86.

- Add declaration to include/hal/usermode.h
- Implement in src/hal/x86/usermode.c (calls x86_enter_usermode_regs)
- Add stubs in ARM, RISC-V, MIPS HAL usermode.c
- scheduler.c now uses hal_usermode_enter_regs() with no guards

Passes: make, cppcheck, QEMU smoke test.
include/hal/usermode.h
src/hal/arm/usermode.c
src/hal/mips/usermode.c
src/hal/riscv/usermode.c
src/hal/x86/usermode.c
src/kernel/scheduler.c