]> Projects (at) Tadryanom (dot) Me - AdrOS.git/commit
refactor: decouple struct process from arch-specific struct registers
authorTulio A M Mendes <[email protected]>
Fri, 13 Feb 2026 19:42:45 +0000 (16:42 -0300)
committerTulio A M Mendes <[email protected]>
Fri, 13 Feb 2026 19:42:45 +0000 (16:42 -0300)
commit2a96572498275dafa7e97bf678d521d843794da7
treec80a25b611cd3cead23650ec0ea2034ec0a39493
parent9807471ef0db84682c5e92023f396b0d97840539
refactor: decouple struct process from arch-specific struct registers

- Replace embedded 'struct registers user_regs' with opaque uint8_t user_regs[ARCH_REGS_SIZE]
- Add include/arch_types.h dispatcher and include/arch/x86/arch_types.h (ARCH_REGS_SIZE=64)
- Change arch_regs_set_retval, arch_regs_set_ustack, hal_usermode_enter_regs, arch_sigreturn
  to accept void* instead of struct registers* — arch implementations cast internally
- process_fork_create and process_clone_create now take const void* child_regs
- Remove #include interrupts.h from process.h, arch_process.h, hal/usermode.h, arch_signal.h
- process.h is now fully architecture-agnostic (no x86 register names visible)

20/20 smoke, cppcheck clean
include/arch/x86/arch_types.h [new file with mode: 0644]
include/arch_process.h
include/arch_signal.h
include/arch_types.h [new file with mode: 0644]
include/hal/usermode.h
include/process.h
src/arch/x86/arch_process.c
src/arch/x86/signal.c
src/hal/x86/usermode.c
src/kernel/scheduler.c