summaryrefslogtreecommitdiff
path: root/kernel/syscall.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/syscall.c')
-rw-r--r--kernel/syscall.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/syscall.c b/kernel/syscall.c
index ff10f9c..a054da2 100644
--- a/kernel/syscall.c
+++ b/kernel/syscall.c
@@ -2,6 +2,7 @@
#include "param.h"
#include "memlayout.h"
#include "riscv.h"
+#include "spinlock.h"
#include "proc.h"
#include "syscall.h"
#include "defs.h"
@@ -170,7 +171,9 @@ dosyscall(void)
num = p->tf->a7;
if(num > 0 && num < NELEM(syscalls) && syscalls[num]) {
+ //printf("%d: syscall %d\n", p->pid, num);
p->tf->a0 = syscalls[num]();
+ //printf("%d: syscall %d -> %d\n", p->pid, num, p->tf->a0);
} else {
printf("%d %s: unknown sys call %d\n",
p->pid, p->name, num);