From cc1a303d096e0fbd256c2b602271a9a3cf19e05d Mon Sep 17 00:00:00 2001 From: Robert Morris Date: Fri, 26 Jul 2019 12:34:06 -0400 Subject: [PATCH] fetchint isn't used any more --- kernel/defs.h | 1 - kernel/syscall.c | 13 ------------- 2 files changed, 14 deletions(-) diff --git a/kernel/defs.h b/kernel/defs.h index c3e6e6e..fa9dd13 100644 --- a/kernel/defs.h +++ b/kernel/defs.h @@ -129,7 +129,6 @@ int argint(int, int*); int argptr(int, uint64*, int); int argstr(int, char*, int); int argaddr(int, uint64 *); -int fetchint(uint64, int*); int fetchstr(uint64, char*, int); int fetchaddr(uint64, uint64*); void syscall(); diff --git a/kernel/syscall.c b/kernel/syscall.c index ec04197..117e78e 100644 --- a/kernel/syscall.c +++ b/kernel/syscall.c @@ -7,19 +7,6 @@ #include "syscall.h" #include "defs.h" -// Fetch the int at addr from the current process. -int -fetchint(uint64 addr, int *ip) -{ - struct proc *p = myproc(); - - if(addr >= p->sz || addr+4 > p->sz) - return -1; - if(copyin(p->pagetable, (char *)ip, addr, sizeof(*ip)) != 0) - return -1; - return 0; -} - // Fetch the uint64 at addr from the current process. int fetchaddr(uint64 addr, uint64 *ip)