M port/portdat.h => port/portdat.h +1 -0
@@ 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];
M port/proc.c => port/proc.c +2 -2
@@ 681,10 681,10 @@ procdump(void)
for(i=0; i<conf.nproc; i++){
p = procalloc.arena+i;
if(p->state != 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);
}
}
}
M port/segment.c => port/segment.c +1 -3
@@ 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++) {