fetchint isn't used any more
This commit is contained in:
parent
f0987d82dc
commit
cc1a303d09
|
@ -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();
|
||||||
|
|
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue