jetcom/xinu-arm — pull request #13 by jnwatts (2013-05-06 01:34:19+00:00)
Title: Workaround for possible bug in ctxsw()

Something is wrong w/ prnull's initial stack layout or SP value.
If the first call to resched() occurs from prnull, prnull's SP becomes
corrupt and the next time it is selected for execution the PC will be
somewhere random in memory.

Experimentally, I found that forcing the first call to resched() to
occur from an IRQ handler (timer in the case of the raspberry-pi)
avoids this issue.