#[repr(C)]pub struct TaskCtx {
ra: usize,
sp: usize,
s: [usize; 12],
}Expand description
任务上下文
保存任务的寄存器信息
不用保存其它寄存器是因为:其它寄存器中,属于调用者保存的寄存器是 由编译器在高级语言编写的调用函数中自动生成的代码来完成保存的; 还有一些寄存器属于临时寄存器,不需要保存和恢复。
Fields§
§ra: usize§sp: usize§s: [usize; 12]Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TaskCtx
impl RefUnwindSafe for TaskCtx
impl Send for TaskCtx
impl Sync for TaskCtx
impl Unpin for TaskCtx
impl UnwindSafe for TaskCtx
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more