From: Tulio A M Mendes Date: Fri, 13 Feb 2026 18:25:45 +0000 (-0300) Subject: fix: replace x86-specific child_regs.eax=0 with arch_regs_set_retval in fork_impl X-Git-Url: https://projects.tadryanom.me/docs/static/gitweb.js?a=commitdiff_plain;h=609f46545655bd0e8fb2e37751fe90153579e18a;p=AdrOS.git fix: replace x86-specific child_regs.eax=0 with arch_regs_set_retval in fork_impl --- diff --git a/src/kernel/syscall.c b/src/kernel/syscall.c index 1da65bb..8cde2f3 100644 --- a/src/kernel/syscall.c +++ b/src/kernel/syscall.c @@ -29,6 +29,7 @@ extern void x86_sysenter_init(void); #include "hal/cpu.h" #include "arch_signal.h" #include "arch_syscall.h" +#include "arch_process.h" #include @@ -178,7 +179,7 @@ static int syscall_fork_impl(struct registers* regs) { if (!child_as) return -ENOMEM; struct registers child_regs = *regs; - child_regs.eax = 0; + arch_regs_set_retval(&child_regs, 0); struct process* child = process_fork_create(child_as, &child_regs); if (!child) {