Benjamin Walsh <benjamin.walsh@...>
On Wed, Feb 24, 2016 at 03:04:41PM +0200, Jukka Rissanen wrote:
I think I figured this out:Yeah, that would do it: the task has to yield to the fiber somehow,
since it will never pend (in a nanokernel context).
After fixing these two issues, the fiber wake up seems to work nowHmm, I would counter this with the argument that passing the current
fiber context is the same as passing any other invalid value. There are
absolutely no checks being done to see if the handle is a pointer to a
However, I think there is an issue if the caller tries to a wake up a
fiber that was potentially sleeping but that has waken up, and is not
running yet. In that case, that will corrupt the fiber ready queue since
the fiber will be pointing to itself for the next fiber to run.
If a fiber is not waiting, it should not be added to the ready queue
(since it's already in the ready queue). The interesting thing with this
fix is that it would catch a fiber trying to wake itself up, since it is