diff options
Diffstat (limited to 'kernel/sysproc.c')
-rw-r--r-- | kernel/sysproc.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/kernel/sysproc.c b/kernel/sysproc.c index 3b4d5bd..88644b2 100644 --- a/kernel/sysproc.c +++ b/kernel/sysproc.c @@ -1,7 +1,7 @@ #include "types.h" #include "riscv.h" -#include "defs.h" #include "param.h" +#include "defs.h" #include "memlayout.h" #include "spinlock.h" #include "proc.h" @@ -54,9 +54,8 @@ sys_sleep(void) int n; uint ticks0; + argint(0, &n); - if(n < 0) - n = 0; acquire(&tickslock); ticks0 = ticks; while(ticks - ticks0 < n){ @@ -70,6 +69,16 @@ sys_sleep(void) return 0; } + +#ifdef LAB_PGTBL +int +sys_pgaccess(void) +{ + // lab pgtbl: your code here. + return 0; +} +#endif + uint64 sys_kill(void) { |