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
Original issue reported on code.google.com by
cinap_le...@felloff.net
on 10 Aug 2011 at 10:04