> On Nov 17, 2021, at 03:22, Martin Pieuchot <[email protected]> wrote:
> 
> On 16/11/21(Tue) 13:55, Visa Hankala wrote:
>> Currently, dopselect() and doppoll() call tsleep_nsec() without retry.
>> cheloha@ asked if the functions should handle spurious wakeups. I guess
>> such wakeups are unlikely with the nowake wait channel, but I am not
>> sure if that is a safe guess.
> 
> I'm not sure to understand, are we afraid a thread sleeping on `nowake'
> can be awaken?  Is it the assumption here?

Yes, but I don't know how.

kettenis@ said spurious wakeups were
possible on a similar loop in sigsuspend(2)
so I mentioned this to visa@ off-list.

If we added an assert to panic in wakeup(9)
if the channel is &nowake, would that be
sufficient?

Ideally if you sleep on &nowake you should
never get a zero status from the sleep
functions.  It should be impossible… if that
is possible to ensure.

Reply via email to