cptaffe / plan9front

Automatically exported from code.google.com/p/plan9front
0 stars 0 forks source link

processes become uninterruptable when queued #81

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
with multiple readers or writers on a qio queue, only one
(the first) process calls sleep(). all later processes hang
in the qlock() call until the head process releases the qlock.

the problem here is that these queued processes are not
interruptable by notes. only the sleeping one can be interrupted.

the pattern is this:

qlock(q->rlock);
if(waserror()){
    qunlock(q->rlock);
    nexterror();
}
sleep(q->rendez);
qunlock(q->rlock);

i think qlock is there to work arround the limitation of
sleep/wakeup (that only work with one sleeper at the time).
qlock serializes the calls to sleep().

Original issue reported on code.google.com by cinap_le...@felloff.net on 10 Aug 2011 at 10:04

GoogleCodeExporter commented 9 years ago

Original comment by cinap_le...@felloff.net on 11 Aug 2011 at 2:44