o Use the MI vm_map_growstack() instead of grow_stack() in trap_pfault()

and trapwrite().
 o On i386/pc98, remove the (now) unused grow_stack().
This commit is contained in:
Alan Cox 2002-03-21 19:27:15 +00:00
parent 8fb3f3f682
commit 8fcaddd792
4 changed files with 8 additions and 36 deletions

View File

@ -716,13 +716,13 @@ trap_pfault(frame, usermode, eva)
/*
* Grow the stack if necessary
*/
/* grow_stack returns false only if va falls into
/* vm_map_growstack fails only if va falls into
* a growable stack region and the stack growth
* fails. It returns true if va was not within
* fails. It succeeds if va was not within
* a growable stack region, or if the stack
* growth succeeded.
*/
if (!grow_stack (p, va))
if (vm_map_growstack(p, va) != KERN_SUCCESS)
rv = KERN_FAILURE;
else
/* Fault in the user page: */
@ -901,7 +901,7 @@ int trapwrite(addr)
++p->p_lock;
PROC_UNLOCK(p);
if (!grow_stack (p, va))
if (vm_map_growstack(p, va) != KERN_SUCCESS)
rv = KERN_FAILURE;
else
/*

View File

@ -514,20 +514,6 @@ cpu_reset_real()
while(1);
}
int
grow_stack(p, sp)
struct proc *p;
u_int sp;
{
int rv;
rv = vm_map_growstack (p, sp);
if (rv != KERN_SUCCESS)
return (0);
return (1);
}
/*
* Software interrupt handler for queued VM system processing.
*/

View File

@ -716,13 +716,13 @@ trap_pfault(frame, usermode, eva)
/*
* Grow the stack if necessary
*/
/* grow_stack returns false only if va falls into
/* vm_map_growstack fails only if va falls into
* a growable stack region and the stack growth
* fails. It returns true if va was not within
* fails. It succeeds if va was not within
* a growable stack region, or if the stack
* growth succeeded.
*/
if (!grow_stack (p, va))
if (vm_map_growstack(p, va) != KERN_SUCCESS)
rv = KERN_FAILURE;
else
/* Fault in the user page: */
@ -901,7 +901,7 @@ int trapwrite(addr)
++p->p_lock;
PROC_UNLOCK(p);
if (!grow_stack (p, va))
if (vm_map_growstack(p, va) != KERN_SUCCESS)
rv = KERN_FAILURE;
else
/*

View File

@ -514,20 +514,6 @@ cpu_reset_real()
while(1);
}
int
grow_stack(p, sp)
struct proc *p;
u_int sp;
{
int rv;
rv = vm_map_growstack (p, sp);
if (rv != KERN_SUCCESS)
return (0);
return (1);
}
/*
* Software interrupt handler for queued VM system processing.
*/