Expand description
The executor
module provides an executor that schedules and runs both the kernel threads and
the user threads.
Re-exports
pub use context::TrapContext;
pub use future::spawn_thread;
pub use future::yield_now;
pub use future::ControlFlow;
Modules
- context 🔒The
context
module provides aTrapContext
struct that save and restore the context of a thread when an exception or interrupt occurs. - future 🔒
Structs
Statics
- LAZY 🔒
Functions
- Initializes the
stvec
to the address of the_enter_kernel_space
function, which is located at the beginning of the TRAMPOLINE page. - Runs an event loop that executes all the tasks in the
TASK_QUEUE
until there are no more task left. - spawn 🔒