#include <cafe/os.h> void OSInitCoroutine(OSCoroutine *coroutine, void *pc, void *sp);
|pc||Start function address for coroutine.|
|sp||Stack pointer for coroutine.|
OSCoroutine coroutine for use by specifying the new coroutine's start (function) address pc and stack pointer sp.
You should allocate storage for the stack that is large enough to support this coroutine's maximum call depth, plus 8 bytes. The stack must be 8-byte aligned and a multiple of 8 bytes long. sp must then refer to 8 bytes short of the end of the stack's storage, allowing the coroutine's stack to grow toward lower addresses.
Demos are available at the following locations.
|Deprecated||Do not call this function in new code.|
|Multiple threads||This function is not thread-safe.|
|Callbacks||Do not call this function from any callback function.|
|Interrupt handler||Do not call this function from any interrupt handler.|
|Exception handler||Do not call this function from any exception handler.|
|Multiple Cores||Do not call this function from more than one Core.|
2013/08/02 Clarify coroutine usage.
2013/05/08 Automated cleanup pass.
2012/08/01 Cleanup Pass.
2011/03/15 Initial version.