fix missed clunkq wakeup race
parent
6bd82b34fd
commit
e440d414d5
|
@ -500,17 +500,16 @@ closeproc(void*)
|
||||||
poperror();
|
poperror();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
qunlock(&clunkq.q);
|
||||||
lock(&clunkq.l);
|
lock(&clunkq.l);
|
||||||
c = clunkq.head;
|
c = clunkq.head;
|
||||||
if(c == nil){
|
if(c == nil){
|
||||||
unlock(&clunkq.l);
|
unlock(&clunkq.l);
|
||||||
qunlock(&clunkq.q);
|
|
||||||
pexit("no work", 1);
|
pexit("no work", 1);
|
||||||
}
|
}
|
||||||
clunkq.head = c->next;
|
clunkq.head = c->next;
|
||||||
clunkq.nclosed++;
|
clunkq.nclosed++;
|
||||||
unlock(&clunkq.l);
|
unlock(&clunkq.l);
|
||||||
qunlock(&clunkq.q);
|
|
||||||
if(!waserror()){
|
if(!waserror()){
|
||||||
devtab[c->type]->close(c);
|
devtab[c->type]->close(c);
|
||||||
poperror();
|
poperror();
|
||||||
|
|
Loading…
Reference in New Issue