more checking for eqlock

This commit is contained in:
cinap_lenrek 2012-02-05 20:52:12 +01:00
parent 247ceabdb6
commit 3599f733ee
2 changed files with 14 additions and 2 deletions

View file

@ -88,6 +88,9 @@ schedinit(void) /* never returns */
mmurelease(up);
unlock(&palloc);
up->mach = nil;
updatecpu(up);
up->qnext = procalloc.free;
procalloc.free = up;
@ -411,6 +414,11 @@ ready(Proc *p)
Schedq *rq;
void (*pt)(Proc*, int, vlong);
if(p->state == Ready){
print("double ready %s %lud pc %p\n", p->text, p->pid, getcallerpc(&p));
return;
}
s = splhi();
if(edfready(p)){
splx(s);
@ -601,6 +609,7 @@ newproc(void)
p->state = Scheding;
p->psstate = "New";
p->mach = 0;
p->eql = 0;
p->qnext = 0;
p->nchild = 0;
p->nwait = 0;

View file

@ -24,7 +24,8 @@ eqlock(QLock *q)
print("eqlock: %#p: ilockdepth %d\n", getcallerpc(&q), m->ilockdepth);
if(up != nil && up->nlocks.ref)
print("eqlock: %#p: nlocks %lud\n", getcallerpc(&q), up->nlocks.ref);
if(up != nil && up->eql)
print("eqlock: %#p: eql %p\n", getcallerpc(&q), up->eql);
if(q->use.key == 0x55555555)
panic("eqlock: q %#p, key 5*\n", q);
@ -58,6 +59,7 @@ eqlock(QLock *q)
up->notepending = 0;
error(Eintr);
}
up->eql = 0;
}
void
@ -69,7 +71,8 @@ qlock(QLock *q)
print("qlock: %#p: ilockdepth %d\n", getcallerpc(&q), m->ilockdepth);
if(up != nil && up->nlocks.ref)
print("qlock: %#p: nlocks %lud\n", getcallerpc(&q), up->nlocks.ref);
if(up != nil && up->eql)
print("qlock: %#p: eql %p\n", getcallerpc(&q), up->eql);
if(q->use.key == 0x55555555)
panic("qlock: q %#p, key 5*\n", q);
lock(&q->use);