~kris/9p

9hist

d1050d4176a9ad3d06d337184f9b0c3006c44231 — David du Colombier 30 years ago 3f8b435
Plan 9 from Bell Labs 1996-06-26
2 files changed, 8 insertions(+), 8 deletions(-)

M pc/trap.c
M port/proc.c
M pc/trap.c => pc/trap.c +7 -7
@@ 269,7 269,7 @@ trap(Ureg *ur)
	else if(ur->pc <= (ulong)end && *(uchar*)ur->pc == 0xCF) {
		if(iret_traps++ > 10)
			panic("iret trap");
		goto out;
		goto saveout;
	}
	iret_traps = 0;



@@ 294,13 294,12 @@ trap(Ureg *ur)
		/* a processor or coprocessor error */
		if(v <= 16){
			if(user){
				spllo();
				sprint(buf, "sys: trap: %s", excname[v]);
				postnote(up, 1, buf, NDebug);
				goto out;
			} else {
				dumpregs(ur);
print("%s pc=0x%lux", excname[v], ur->pc);
for(;;);
				panic("%s pc=0x%lux", excname[v], ur->pc);
			}
		}


@@ 316,7 315,7 @@ for(;;);
			 * In fact, just ignore all such interrupts.
			 */
			if((isr & (1<<v)) == 0)
				goto out;
				goto saveout;
			if(badintr[v]++ == 0 || (badintr[v]%100000) == 0){
				print("unknown interrupt %d pc=0x%lux: total %d\n", v,
					ur->pc, badintr[v]);


@@ 326,7 325,7 @@ for(;;);
			/* unimplemented traps */
			print("illegal trap %d pc=0x%lux\n", v, ur->pc);
		}
		goto out;
		goto saveout;
	}

	/* there may be multiple handlers on one interrupt level */


@@ 338,10 337,11 @@ for(;;);
	/*
	 *  check user since syscall does its own notifying
	 */
out:
	splhi();
	if(v != Syscallvec && user && (up->procctl || up->nnote))
		notify(ur);
out:
saveout:
	scndlastur = lastur;
	lastur = *ur;
}


@@ 526,9 526,9 @@ notify(Ureg *ur)
	}

	if(n->flag!=NUser && (up->notified || up->notify==0)){
		qunlock(&up->debug);
		if(n->flag == NDebug)
			pprint("suicide: %s\n", n->msg);
		qunlock(&up->debug);
		pexit(n->msg, n->flag!=NDebug);
	}


M port/proc.c => port/proc.c +1 -1
@@ 515,7 515,7 @@ postnote(Proc *p, int dolock, char *n, int flag)

	ret = 0;
	if(p->nnote < NNOTE) {
		strcpy(p->note[up->nnote].msg, n);
		strcpy(p->note[p->nnote].msg, n);
		p->note[p->nnote++].flag = flag;
		ret = 1;
	}