aboutsummaryrefslogtreecommitdiff
path: root/common/uapi/dispatch.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/uapi/dispatch.c')
-rw-r--r--common/uapi/dispatch.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/common/uapi/dispatch.c b/common/uapi/dispatch.c
index 27cc001..2cf19fb 100644
--- a/common/uapi/dispatch.c
+++ b/common/uapi/dispatch.c
@@ -10,6 +10,8 @@
#include <apos/debug.h>
#include <apos/uapi.h>
+#include <arch/proc.h>
+
/** Syscall number to syscall handler conversion. */
static const sys_t syscall_table[] = {
/* noop */
@@ -79,10 +81,11 @@ SYSCALL_DEFINE1(putch)(sys_arg_t a){
return SYS_RET1(OK);
}
-struct sys_ret syscall_dispatch(sys_arg_t syscall, sys_arg_t a, sys_arg_t b,
- sys_arg_t c, sys_arg_t d, sys_arg_t e)
+struct sys_ret handle_syscall(struct tcb *t,
+ sys_arg_t syscall, sys_arg_t a, sys_arg_t b,
+ sys_arg_t c, sys_arg_t d, sys_arg_t e)
{
- struct tcb *t = cur_tcb();
+ adjust_syscall(t);
size_t sc = syscall;
if (sc >= ARRAY_SIZE(syscall_table)) {