From f1ef638b3f25c858858e2d465204da6fd1936a01 Mon Sep 17 00:00:00 2001 From: David du Colombier <0intro@gmail.com> Date: Fri, 4 Jun 1999 00:00:00 +0000 Subject: [PATCH] Plan 9 from Bell Labs 1999-06-04 --- pc/trap.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pc/trap.c b/pc/trap.c index 7201e1af3bec386be15940314003eaa0966ca4f7..2926d4ea52329cf809955e2c4b72231392a74c2a 100644 --- a/pc/trap.c +++ b/pc/trap.c @@ -595,8 +595,8 @@ noted(Ureg* ureg, ulong arg0) case NCONT: case NRSTR: if(!okaddr(nureg->pc, 1, 0) || !okaddr(nureg->usp, BY2WD, 0)){ - pprint("suicide: trap in noted\n"); qunlock(&up->debug); + pprint("suicide: trap in noted\n"); pexit("Suicide", 0); } up->ureg = (Ureg*)(*(ulong*)(oureg-BY2WD)); @@ -606,8 +606,8 @@ noted(Ureg* ureg, ulong arg0) case NSAVE: if(!okaddr(nureg->pc, BY2WD, 0) || !okaddr(nureg->usp, BY2WD, 0)){ - pprint("suicide: trap in noted\n"); qunlock(&up->debug); + pprint("suicide: trap in noted\n"); pexit("Suicide", 0); } qunlock(&up->debug); @@ -624,9 +624,11 @@ noted(Ureg* ureg, ulong arg0) /* fall through */ case NDFLT: - if(up->lastnote.flag == NDebug) + if(up->lastnote.flag == NDebug){ + qunlock(&up->debug); pprint("suicide: %s\n", up->lastnote.msg); - qunlock(&up->debug); + } else + qunlock(&up->debug); pexit(up->lastnote.msg, up->lastnote.flag!=NDebug); } }