diff options
author | cinap_lenrek <cinap_lenrek@gmx.de> | 2012-04-27 18:51:15 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@gmx.de> | 2012-04-27 18:51:15 +0200 |
commit | e440d414d57af87e40fff560b58077443af91696 (patch) | |
tree | e9991392165783cae6733787f885c3718cbdbf7d /sys/src/9/port/chan.c | |
parent | 6bd82b34fd6ff8955ff372c1e84ec94e80ddf98a (diff) |
fix missed clunkq wakeup race
Diffstat (limited to 'sys/src/9/port/chan.c')
-rw-r--r-- | sys/src/9/port/chan.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/src/9/port/chan.c b/sys/src/9/port/chan.c index 6c86aff03..203f5bcba 100644 --- a/sys/src/9/port/chan.c +++ b/sys/src/9/port/chan.c @@ -500,17 +500,16 @@ closeproc(void*) poperror(); } } + qunlock(&clunkq.q); lock(&clunkq.l); c = clunkq.head; if(c == nil){ unlock(&clunkq.l); - qunlock(&clunkq.q); pexit("no work", 1); } clunkq.head = c->next; clunkq.nclosed++; unlock(&clunkq.l); - qunlock(&clunkq.q); if(!waserror()){ devtab[c->type]->close(c); poperror(); |