clear_pte_u -> clearpteu
This commit is contained in:
parent
91aa0f3296
commit
2eb214c9db
3 changed files with 4 additions and 4 deletions
2
defs.h
2
defs.h
|
@ -176,7 +176,7 @@ pde_t* copyuvm(pde_t*, uint);
|
|||
void switchuvm(struct proc*);
|
||||
void switchkvm(void);
|
||||
int copyout(pde_t*, uint, void*, uint);
|
||||
void clear_pte_u(pde_t *pgdir, char *uva);
|
||||
void clearpteu(pde_t *pgdir, char *uva);
|
||||
|
||||
// number of elements in fixed-size array
|
||||
#define NELEM(x) (sizeof(x)/sizeof((x)[0]))
|
||||
|
|
2
exec.c
2
exec.c
|
@ -55,7 +55,7 @@ exec(char *path, char **argv)
|
|||
sz = PGROUNDUP(sz);
|
||||
if((sz = allocuvm(pgdir, sz, sz + 2*PGSIZE)) == 0)
|
||||
goto bad;
|
||||
clear_pte_u(pgdir, (char*)(sz-2*PGSIZE));
|
||||
clearpteu(pgdir, (char*)(sz - 2*PGSIZE));
|
||||
sp = sz;
|
||||
|
||||
// Push argument strings, prepare rest of stack in ustack.
|
||||
|
|
4
vm.c
4
vm.c
|
@ -292,13 +292,13 @@ freevm(pde_t *pgdir)
|
|||
// Clear PTE_U on a page. Used to create an inaccessible
|
||||
// page beneath the user stack.
|
||||
void
|
||||
clear_pte_u(pde_t *pgdir, char *uva)
|
||||
clearpteu(pde_t *pgdir, char *uva)
|
||||
{
|
||||
pte_t *pte;
|
||||
|
||||
pte = walkpgdir(pgdir, uva, 0);
|
||||
if(pte == 0)
|
||||
panic("clear_pte_u");
|
||||
panic("clearpteu");
|
||||
*pte &= ~PTE_U;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue