Note: not yet ported to libv2
.
Purpose
- Define and implement threads, based on coroutines
- Install the kernel on a core
- initialise kernel data
- set up scheduler exception handler
- set up executive coroutine
- Start the scheduler on a core
- switch to process stack pointer
- enable kernel exceptions and interrupts
- transfer control to the executive coroutine
- Allocate code to a thread to execute, configure thread (period, prio)
- In-thread API, eg.
- yield control back to scheduler
- delay (non-blocking)
- suspend
- set timeout
- await device flags set or cleared