From a658e1068eb2f849736931d2b99bcb6290c7ec0a Mon Sep 17 00:00:00 2001 From: dzwdz Date: Fri, 29 Jul 2022 18:45:47 +0200 Subject: syscall: up the max argument count to 5; make write accept flags --- src/kernel/execbuf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/kernel/execbuf.c') diff --git a/src/kernel/execbuf.c b/src/kernel/execbuf.c index 682566e..8ab0268 100644 --- a/src/kernel/execbuf.c +++ b/src/kernel/execbuf.c @@ -19,7 +19,7 @@ static void try_fetch(struct process *proc, uint64_t *buf, size_t amt) { } _Noreturn void execbuf_run(struct process *proc) { - uint64_t buf[5]; + uint64_t buf[6]; assert(proc == process_current); // idiotic, but needed because of _syscall. assert(proc->state == PS_RUNNING); @@ -28,8 +28,8 @@ _Noreturn void execbuf_run(struct process *proc) { try_fetch(proc, buf, 1); switch (buf[0]) { case EXECBUF_SYSCALL: - try_fetch(proc, buf, 5); - _syscall(buf[0], buf[1], buf[2], buf[3], buf[4]); + try_fetch(proc, buf, 6); + _syscall(buf[0], buf[1], buf[2], buf[3], buf[4], buf[5]); process_switch_any(); case EXECBUF_JMP: -- cgit v1.2.3