fetchint isn't used any more

This commit is contained in:
Robert Morris 2019-07-26 12:34:06 -04:00
parent f0987d82dc
commit cc1a303d09
2 changed files with 0 additions and 14 deletions

View file

@ -129,7 +129,6 @@ int argint(int, int*);
int argptr(int, uint64*, int); int argptr(int, uint64*, int);
int argstr(int, char*, int); int argstr(int, char*, int);
int argaddr(int, uint64 *); int argaddr(int, uint64 *);
int fetchint(uint64, int*);
int fetchstr(uint64, char*, int); int fetchstr(uint64, char*, int);
int fetchaddr(uint64, uint64*); int fetchaddr(uint64, uint64*);
void syscall(); void syscall();

View file

@ -7,19 +7,6 @@
#include "syscall.h" #include "syscall.h"
#include "defs.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. // Fetch the uint64 at addr from the current process.
int int
fetchaddr(uint64 addr, uint64 *ip) fetchaddr(uint64 addr, uint64 *ip)