Trait Platform

Source
pub trait Platform {
Show 19 methods // Required methods fn kernel_regions() -> KernelRegions; fn kstack_size() -> usize; fn cpu_id() -> usize; fn cpu_context_size() -> usize; unsafe fn get_current_tcb_addr() -> *mut u8; unsafe fn set_current_tcb_addr(addr: *mut u8); unsafe fn cpu_context_sp(ctx_ptr: *const u8) -> usize; unsafe fn cpu_context_set_sp(ctx_ptr: *const u8, sp: usize); unsafe fn cpu_context_set_pc(ctx_ptr: *const u8, pc: usize); unsafe fn cpu_context_switch(prev_tcb: *mut u8, next_tcb: *mut u8); fn wait_for_interrupt(); fn irq_all_enable(); fn irq_all_disable(); fn irq_all_is_enabled() -> bool; fn shutdown() -> !; fn debug_put(b: u8); fn dcache_range(op: CacheOp, addr: usize, size: usize); fn driver_registers() -> DriverRegisterSlice; // Provided method fn on_boot_success() { ... }
}

Required Methods§

Source

fn kernel_regions() -> KernelRegions

Source

fn kstack_size() -> usize

Source

fn cpu_id() -> usize

Source

fn cpu_context_size() -> usize

Source

unsafe fn get_current_tcb_addr() -> *mut u8

§Safety
Source

unsafe fn set_current_tcb_addr(addr: *mut u8)

§Safety
Source

unsafe fn cpu_context_sp(ctx_ptr: *const u8) -> usize

§Safety

ctx_ptr 是有效的上下文指针

Source

unsafe fn cpu_context_set_sp(ctx_ptr: *const u8, sp: usize)

§Safety

ctx_ptr 是有效的上下文指针

Source

unsafe fn cpu_context_set_pc(ctx_ptr: *const u8, pc: usize)

§Safety

ctx_ptr 是有效的上下文指针

Source

unsafe fn cpu_context_switch(prev_tcb: *mut u8, next_tcb: *mut u8)

§Safety
Source

fn wait_for_interrupt()

Source

fn irq_all_enable()

Source

fn irq_all_disable()

Source

fn irq_all_is_enabled() -> bool

Source

fn shutdown() -> !

Source

fn debug_put(b: u8)

Source

fn dcache_range(op: CacheOp, addr: usize, size: usize)

Source

fn driver_registers() -> DriverRegisterSlice

Provided Methods§

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§