summaryrefslogtreecommitdiffstats
path: root/sys/alpha
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2001-05-11 23:17:54 +0000
committerjhb <jhb@FreeBSD.org>2001-05-11 23:17:54 +0000
commita3d99e209757e7c384682f8df4180c9d50a6b3e7 (patch)
treeecc231b5a9761418961861e8bda02c2500cd15c6 /sys/alpha
parent465be778a85ef9ed61c5013d3ae2580aca3b727a (diff)
downloadFreeBSD-src-a3d99e209757e7c384682f8df4180c9d50a6b3e7.zip
FreeBSD-src-a3d99e209757e7c384682f8df4180c9d50a6b3e7.tar.gz
Simply the vm fault trap handling code a bit by using if-else instead of
duplicating code in the then case and then using a goto to jump around the else case.
Diffstat (limited to 'sys/alpha')
-rw-r--r--sys/alpha/alpha/trap.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/sys/alpha/alpha/trap.c b/sys/alpha/alpha/trap.c
index 7238e7a..1134369 100644
--- a/sys/alpha/alpha/trap.c
+++ b/sys/alpha/alpha/trap.c
@@ -580,17 +580,11 @@ trap(a0, a1, a2, entry, framep)
* a growable stack region, or if the stack
* growth succeeded.
*/
- if (!grow_stack (p, va)) {
+ if (!grow_stack (p, va))
rv = KERN_FAILURE;
- PROC_LOCK(p);
- --p->p_lock;
- PROC_UNLOCK(p);
- goto nogo;
- }
-
-
- /* Fault in the user page: */
- rv = vm_fault(map, va, ftype,
+ else
+ /* Fault in the user page: */
+ rv = vm_fault(map, va, ftype,
(ftype & VM_PROT_WRITE)
? VM_FAULT_DIRTY
: VM_FAULT_NORMAL);
@@ -606,7 +600,6 @@ trap(a0, a1, a2, entry, framep)
rv = vm_fault(map, va, ftype, VM_FAULT_NORMAL);
}
- nogo:;
/*
* If this was a stack access we keep track of the
* maximum accessed stack size. Also, if vm_fault
OpenPOWER on IntegriCloud