const TASK_UNUSED
pub const TASK_UNUSED = 0Purpose
Constant TASK_UNUSED, defining protocol or algorithm parameters.
#core/taskKernel multi-tasking, context switching, and execution control for baremetal kernels.
const TASK_UNUSEDpub const TASK_UNUSED = 0Constant TASK_UNUSED, defining protocol or algorithm parameters.
const TASK_READYpub const TASK_READY = 1Constant TASK_READY, defining protocol or algorithm parameters.
const TASK_RUNNINGpub const TASK_RUNNING = 2Constant TASK_RUNNING, defining protocol or algorithm parameters.
const TASK_BLOCKEDpub const TASK_BLOCKED = 3Constant TASK_BLOCKED, defining protocol or algorithm parameters.
const TASK_DEADpub const TASK_DEAD = 4Constant TASK_DEAD, defining protocol or algorithm parameters.
struct TaskContextpub struct TaskContext {
pub regs0 u64
pub regs1 u64
pub regs2 u64
pub regs3 u64
pub regs4 u64
pub regs5 u64
pub regs6 u64
pub regs7 u64
pub regs8 u64
pub regs9 u64
pub fp u64 // offset 80
pub pc u64 // offset 88
pub sp u64 // offset 96
pub pad0 u64 // offset 104
pub pad1 u64 // offset 112
pub pad2 u64 // offset 120
pub pad3 u64 // offset 128
pub pad4 u64 // offset 136
pub pad5 u64 // offset 144
pub pad6 u64 // offset 152
pub pad7 u64 // offset 160
pub pad8 u64 // offset 168
pub pad9 u64 // offset 176
pub pad10 u64 // offset 184
}Structure encapsulating regs0, regs1, regs2, regs3, regs4.
regs0 u64regs1 u64regs2 u64regs3 u64regs4 u64regs5 u64regs6 u64regs7 u64regs8 u64regs9 u64fp u64 // offset 80pc u64 // offset 88sp u64 // offset 96pad0 u64 // offset 104pad1 u64 // offset 112pad2 u64 // offset 120pad3 u64 // offset 128pad4 u64 // offset 136pad5 u64 // offset 144pad6 u64 // offset 152pad7 u64 // offset 160pad8 u64 // offset 168pad9 u64 // offset 176pad10 u64 // offset 184task_context_newpub fn task_context_new() TaskContextTask context new.
No arguments are required.
TaskContext — a value of this type
($&TaskContext) initpub fn (ctx $&TaskContext) init(entry u64, stack_top u64)Initialize internal state and default parameters.
ctx $&TaskContextTaskContext instance used by this call (exclusive borrow).entry u64stack_top u64This call does not return a value.
task_switchpub fn task_switch(prev $&TaskContext, next &TaskContext)Safe ergonomic context switch wrapper between two task contexts.
prev $&TaskContextnext &TaskContextThis call does not return a value.
struct TrapFramepub struct TrapFrame {
pub r15 u64
pub r14 u64
pub r13 u64
pub r12 u64
pub r11 u64
pub r10 u64
pub r9 u64
pub r8 u64
pub rbp u64
pub rdi u64
pub rsi u64
pub rdx u64
pub rcx u64
pub rbx u64
pub rax u64
pub vec u64
pub error_code u64
pub rip u64
pub cs u64
pub rflags u64
pub rsp u64
pub ss u64
}Task Protocol data frame encapsulation.
r15 u64r14 u64r13 u64r12 u64r11 u64r10 u64r9 u64r8 u64rbp u64rdi u64rsi u64rdx u64rcx u64rbx u64rax u64vec u64error_code u64rip u64cs u64rflags u64rsp u64ss u64trap_frame_newpub fn trap_frame_new() TrapFrameTrap frame new.
No arguments are required.
TrapFrame — a value of this type
struct Arm64TrapFramepub struct Arm64TrapFrame {
pub x0 u64
pub x1 u64
pub x2 u64
pub x3 u64
pub x4 u64
pub x5 u64
pub x6 u64
pub x7 u64
pub x8 u64
pub x9 u64
pub x10 u64
pub x11 u64
pub x12 u64
pub x13 u64
pub x14 u64
pub x15 u64
pub x16 u64
pub x17 u64
pub x18 u64
pub x19 u64
pub x20 u64
pub x21 u64
pub x22 u64
pub x23 u64
pub x24 u64
pub x25 u64
pub x26 u64
pub x27 u64
pub x28 u64
pub x29 u64
pub x30 u64
pub sp_el0 u64
pub elr_el1 u64
pub spsr_el1 u64
pub esr_el1 u64
pub far_el1 u64
}Task Protocol data frame encapsulation.
x0 u64x1 u64x2 u64x3 u64x4 u64x5 u64x6 u64x7 u64x8 u64x9 u64x10 u64x11 u64x12 u64x13 u64x14 u64x15 u64x16 u64x17 u64x18 u64x19 u64x20 u64x21 u64x22 u64x23 u64x24 u64x25 u64x26 u64x27 u64x28 u64x29 u64x30 u64sp_el0 u64elr_el1 u64spsr_el1 u64esr_el1 u64far_el1 u64arm64_trap_frame_newpub fn arm64_trap_frame_new() Arm64TrapFrameArm64 trap frame new.
No arguments are required.
Arm64TrapFrame — a value of this type
struct Rv64TrapFramepub struct Rv64TrapFrame {
pub x1 u64
pub x2 u64
pub x3 u64
pub x4 u64
pub x5 u64
pub x6 u64
pub x7 u64
pub x8 u64
pub x9 u64
pub x10 u64
pub x11 u64
pub x12 u64
pub x13 u64
pub x14 u64
pub x15 u64
pub x16 u64
pub x17 u64
pub x18 u64
pub x19 u64
pub x20 u64
pub x21 u64
pub x22 u64
pub x23 u64
pub x24 u64
pub x25 u64
pub x26 u64
pub x27 u64
pub x28 u64
pub x29 u64
pub x30 u64
pub x31 u64
pub sepc u64
pub sstatus u64
pub scause u64
pub stval u64
pub pad u64
}Task Protocol data frame encapsulation.
x1 u64x2 u64x3 u64x4 u64x5 u64x6 u64x7 u64x8 u64x9 u64x10 u64x11 u64x12 u64x13 u64x14 u64x15 u64x16 u64x17 u64x18 u64x19 u64x20 u64x21 u64x22 u64x23 u64x24 u64x25 u64x26 u64x27 u64x28 u64x29 u64x30 u64x31 u64sepc u64sstatus u64scause u64stval u64pad u64rv64_trap_frame_newpub fn rv64_trap_frame_new() Rv64TrapFrameRv64 trap frame new.
No arguments are required.
Rv64TrapFrame — a value of this type