No. It's not true that all sleeps might return spuriously (it might have
been true in Unix, I can't remember).
It's not true in Plan 9.

On 23 August 2012 12:24, erik quanstrom <[email protected]> wrote:

> >       sleep(&up->waitr, haswaitq, up);
> >
> >       lock(&up->exl);
> >       wq = up->waitq;
> >       up->waitq = wq->next;   <-- wq == nil, boom! its gone!
> >       up->nwait--;
> >       unlock(&up->exl);
> >
> >
> > if sleep returns or is spuriously woken up even tho up->waitq == nil.
>
> ah, right.  looks like a bug.
>
> - erik
>
>

Reply via email to