]> Projects (at) Tadryanom (dot) Me - AdrOS.git/commit
refactor: extract x86 kernel stack setup and register accessors from scheduler to...
authorTulio A M Mendes <[email protected]>
Fri, 13 Feb 2026 00:29:02 +0000 (21:29 -0300)
committerTulio A M Mendes <[email protected]>
Fri, 13 Feb 2026 02:44:55 +0000 (23:44 -0300)
commitd21f2609e373308527ad8669a0622c24c895eb06
tree060c60d751e7a7ddf0f0eb40959364da70930440
parent9b6a4023bf942a2808b489b9931374543188b0d6
refactor: extract x86 kernel stack setup and register accessors from scheduler to arch layer

- New include/arch_process.h: arch-agnostic prototypes for arch_kstack_init(),
  arch_regs_set_retval(), arch_regs_set_ustack()
- New src/arch/x86/arch_process.c: x86 implementation (EFLAGS 0x202, cdecl
  stack frame layout matching context_switch in process.S)
- scheduler.c: process_create_kernel, process_fork_create, process_clone_create
  now use arch_kstack_init() instead of inline x86 stack manipulation
- scheduler.c: process_clone_create uses arch_regs_set_retval/arch_regs_set_ustack
  instead of direct .eax/.useresp access

No x86-specific constants or register names remain in scheduler.c.
.gitignore
include/arch_process.h [new file with mode: 0644]
src/arch/x86/arch_process.c [new file with mode: 0644]
src/kernel/scheduler.c