From f8634a54e08e2735525ec3e8394de6eece57faff Mon Sep 17 00:00:00 2001 From: David du Colombier <0intro@gmail.com> Date: Fri, 30 Aug 1991 00:00:00 +0000 Subject: [PATCH] Plan 9 from Bell Labs 1991-08-30 --- port/portdat.h | 1 + port/proc.c | 4 ++-- port/segment.c | 4 +--- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/port/portdat.h b/port/portdat.h index 9bf067d4354f763224294a8b0e1a571e425a02e1..b427e04c2da04053999d1e0bd0888cd9d5862404 100644 --- a/port/portdat.h +++ b/port/portdat.h @@ -485,6 +485,7 @@ struct Proc Proc *rnext; /* next process in run queue */ Proc *qnext; /* next process on queue for a QLock */ QLock *qlock; /* address of qlock being queued for DEBUG */ + ulong qlockpc; /* pc of last call to qlock */ int state; Page *upage; /* BUG: should be unlinked from page list */ Segment *seg[NSEG]; diff --git a/port/proc.c b/port/proc.c index 43c93afe8aaeb802876a63b75074aae20cb42aac..4115d2ea0e78e153a8aa49c56b23dcd75016bdfb 100644 --- a/port/proc.c +++ b/port/proc.c @@ -681,10 +681,10 @@ procdump(void) for(i=0; istate != Dead){ - print("%d:%s %s upc %lux %s ut %ld st %ld r %lux\n", + print("%d:%s %s upc %lux %s ut %ld st %ld r %lux qpc %lux\n", p->pid, p->text, p->pgrp ? p->pgrp->user : "pgrp=0", p->pc, - statename[p->state], p->time[0], p->time[1], p->r); + statename[p->state], p->time[0], p->time[1], p->r, p->qlockpc); } } } diff --git a/port/segment.c b/port/segment.c index 67a8472243d54272b795108e80c4875f261a1db7..1b1571b62aac143373166ed5e5ae522c309c54c5 100644 --- a/port/segment.c +++ b/port/segment.c @@ -354,9 +354,7 @@ ibrk(ulong addr, int seg) if(newsize > (PTEMAPMEM*SEGMAPSIZE)/BY2PG) { qunlock(&s->lk); - pprint("exceeded max segment size\n"); - pexit("Suicide", 0); - error(Esegaddr); + return -1; } for(i = 0; i < NSEG; i++) {