From 9900cc737988f25db30b5876f066a78e73389205 Mon Sep 17 00:00:00 2001 From: dzwdz Date: Thu, 5 May 2022 22:12:55 +0200 Subject: kernel: syscalls now have to explicitly save the return value thus they can opt out of doing that so the calls which might return immediately but can return later don't have to both regs_savereturn and return to the caller. and because of that, the return values of a lot of VFS things have just got way saner --- src/kernel/arch/i386/registers.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/kernel/arch/i386/registers.h') diff --git a/src/kernel/arch/i386/registers.h b/src/kernel/arch/i386/registers.h index 8bd090d..9f481d3 100644 --- a/src/kernel/arch/i386/registers.h +++ b/src/kernel/arch/i386/registers.h @@ -14,7 +14,8 @@ struct registers { } __attribute__((__packed__)); // saves a return value according to the SysV ABI -static inline void regs_savereturn(struct registers *regs, uint64_t value) { +static inline uint64_t regs_savereturn(struct registers *regs, uint64_t value) { regs->eax = value; regs->edx = value >> 32; + return value; } -- cgit v1.2.3