This branch rewrites the maitake::sync::WaitCell type a bit to fix
potential lost wakeups accidentally introduced in #453. In addition, it
changes the API a bit:
Replace register_wait with poll_wait, which I think is a bit
nicer,
Removed the RegisterError::Waking variant since poll_wait returns
Ready if the cell was woken, and renamed RegisterError to just
Error,
Introduced a WaitCell::subscribe method to eagerly pre-register the
task's Waker in the WaitCell. This is intended to be used to
register the task to be woken before performing an operation that
results in a wakeup, such as enabling an interrupt that will wake the
task.
okay, you know what? this PR was the worst thing that's ever happened to me. i'm going to give up on trying to write a test to reproduce the last problem.
This branch rewrites the
maitake::sync::WaitCell
type a bit to fix potential lost wakeups accidentally introduced in #453. In addition, it changes the API a bit:register_wait
withpoll_wait
, which I think is a bit nicer,RegisterError::Waking
variant sincepoll_wait
returnsReady
if the cell was woken, and renamedRegisterError
to justError
,WaitCell::subscribe
method to eagerly pre-register the task'sWaker
in theWaitCell
. This is intended to be used to register the task to be woken before performing an operation that results in a wakeup, such as enabling an interrupt that will wake the task.Closes #455