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§
fn kernel_regions() -> KernelRegions
fn kstack_size() -> usize
fn cpu_id() -> usize
fn cpu_context_size() -> usize
Sourceunsafe fn get_current_tcb_addr() -> *mut u8
unsafe fn get_current_tcb_addr() -> *mut u8
§Safety
Sourceunsafe fn set_current_tcb_addr(addr: *mut u8)
unsafe fn set_current_tcb_addr(addr: *mut u8)
§Safety
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 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.