summaryrefslogtreecommitdiff
path: root/src/kernel/syscalls.c
diff options
context:
space:
mode:
authordzwdz2024-07-27 19:59:37 +0200
committerdzwdz2024-07-27 20:00:29 +0200
commitfe6fbfa07aa8326926049cf62560d940bc7305c0 (patch)
treee97060cb23c8a5a227fe615b97d9213d5fc2ad1e /src/kernel/syscalls.c
parent58514d351e1f0e8871f534422cf025109ddbb844 (diff)
kernel: don't use pointer types for registers, add proc_savereturn
Diffstat (limited to 'src/kernel/syscalls.c')
-rw-r--r--src/kernel/syscalls.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/kernel/syscalls.c b/src/kernel/syscalls.c
index ffd69b8..42f548e 100644
--- a/src/kernel/syscalls.c
+++ b/src/kernel/syscalls.c
@@ -14,7 +14,7 @@
#define SYSCALL_RETURN(val) do { \
assert(proc_cur->state == PS_RUNNING); \
- regs_savereturn(&proc_cur->regs, (long)(val)); \
+ proc_savereturn(proc_cur, (long)(val)); \
return 0; \
} while (0)
@@ -27,7 +27,7 @@ long _sys_fork(int flags, hid_t __user *fs_front) {
Proc *child;
child = proc_fork(proc_cur, flags);
- regs_savereturn(&child->regs, 0);
+ proc_savereturn(child, 0);
if (flags & FORK_NEWFS) {
Handle *h;
@@ -589,7 +589,7 @@ long _syscall(long num, long a, long b, long c, long d, long e) {
break; case _SYS_DEBUG_KLOG: _sys_debug_klog((userptr_t)a, b);
break;
default:
- regs_savereturn(&proc_cur->regs, -1);
+ proc_savereturn(proc_cur, -1);
break;
}
/* return value is unused. execution continues in sysenter_stage2 */