Module kernel::kernel

source ·
Expand description

Tock’s main kernel loop, scheduler loop, and Scheduler trait.

This module also includes utility functions that are commonly used by scheduler policy implementations. Scheduling policy (round robin, priority, etc.) is defined in the sched subcrate and selected by a board.


  • Main object for the kernel. Each board will need to create one.


  • Represents the different outcomes when trying to allocate a grant region


  • Threshold in microseconds to consider a process’s timeslice to be exhausted. That is, Tock will skip re-scheduling a process if its remaining timeslice is less than this threshold.


  • Tries to allocate the grant region for specified driver and process. Returns if a new grant was allocated or not