From a717296a2036cede5fccfff544513043a984d614 Mon Sep 17 00:00:00 2001 From: Kimplul Date: Thu, 15 Sep 2022 19:21:14 +0300 Subject: change syscalls to take 5 params and return 6 + In total, a syscall is built up of 6 values, with the first being the syscall number. Symmetrically, the first value is now a status and the following five values return "values". This allows us to cram in more info into the ipc_* functions. The performance difference is absolutely minimal, at least from my testing in qemu. --- common/uapi/conf.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'common/uapi/conf.c') diff --git a/common/uapi/conf.c b/common/uapi/conf.c index 470b81e..bf4b42c 100644 --- a/common/uapi/conf.c +++ b/common/uapi/conf.c @@ -25,7 +25,7 @@ size_t __call_stack_size = SZ_2M; */ SYSCALL_DEFINE1(conf_get)(sys_arg_t param) { - return (struct sys_ret){ OK, 0 }; + return (struct sys_ret){ OK, 0, 0, 0, 0, 0 }; } /** @@ -43,7 +43,7 @@ SYSCALL_DEFINE2(conf_set)(sys_arg_t param, sys_arg_t val) UNUSED(val); /* no parameters supported atm */ - return (struct sys_ret){ OK, 0 }; + return (struct sys_ret){ OK, 0, 0, 0, 0, 0 }; } /** @@ -59,8 +59,8 @@ SYSCALL_DEFINE1(poweroff)(sys_arg_t type) case SHUTDOWN: case COLD_REBOOT: case WARM_REBOOT: - return (struct sys_ret){ OK, poweroff(type) }; + return (struct sys_ret){ OK, poweroff(type), 0, 0, 0, 0 }; }; - return (struct sys_ret){ ERR_INVAL, 0 }; + return (struct sys_ret){ ERR_INVAL, 0, 0, 0, 0, 0 }; } -- cgit v1.3