Trait kernel::platform::KernelResources
source · pub trait KernelResources<C: Chip> {
type SyscallDriverLookup: SyscallDriverLookup;
type SyscallFilter: SyscallFilter;
type ProcessFault: ProcessFault;
type ContextSwitchCallback: ContextSwitchCallback;
type Scheduler: Scheduler<C>;
type SchedulerTimer: SchedulerTimer;
type WatchDog: WatchDog;
// Required methods
fn syscall_driver_lookup(&self) -> &Self::SyscallDriverLookup;
fn syscall_filter(&self) -> &Self::SyscallFilter;
fn process_fault(&self) -> &Self::ProcessFault;
fn context_switch_callback(&self) -> &Self::ContextSwitchCallback;
fn scheduler(&self) -> &Self::Scheduler;
fn scheduler_timer(&self) -> &Self::SchedulerTimer;
fn watchdog(&self) -> &Self::WatchDog;
}
Expand description
Combination trait that boards provide to the kernel that includes all of the extensible operations the kernel supports.
This is the primary method for configuring the kernel for a specific board.
Required Associated Types§
sourcetype SyscallDriverLookup: SyscallDriverLookup
type SyscallDriverLookup: SyscallDriverLookup
The implementation of the system call dispatch mechanism the kernel will use.
sourcetype SyscallFilter: SyscallFilter
type SyscallFilter: SyscallFilter
The implementation of the system call filtering mechanism the kernel will use.
sourcetype ProcessFault: ProcessFault
type ProcessFault: ProcessFault
The implementation of the process fault handling mechanism the kernel will use.
sourcetype ContextSwitchCallback: ContextSwitchCallback
type ContextSwitchCallback: ContextSwitchCallback
The implementation of the context switch callback handler the kernel will use.
sourcetype Scheduler: Scheduler<C>
type Scheduler: Scheduler<C>
The implementation of the scheduling algorithm the kernel will use.
sourcetype SchedulerTimer: SchedulerTimer
type SchedulerTimer: SchedulerTimer
The implementation of the timer used to create the timeslices provided to applications.
Required Methods§
sourcefn syscall_driver_lookup(&self) -> &Self::SyscallDriverLookup
fn syscall_driver_lookup(&self) -> &Self::SyscallDriverLookup
Returns a reference to the implementation of the SyscallDriverLookup this platform will use to route syscalls.
sourcefn syscall_filter(&self) -> &Self::SyscallFilter
fn syscall_filter(&self) -> &Self::SyscallFilter
Returns a reference to the implementation of the SyscallFilter this platform wants the kernel to use.
sourcefn process_fault(&self) -> &Self::ProcessFault
fn process_fault(&self) -> &Self::ProcessFault
Returns a reference to the implementation of the ProcessFault handler this platform wants the kernel to use.
sourcefn context_switch_callback(&self) -> &Self::ContextSwitchCallback
fn context_switch_callback(&self) -> &Self::ContextSwitchCallback
Returns a reference to the implementation of the ContextSwitchCallback for this platform.
sourcefn scheduler(&self) -> &Self::Scheduler
fn scheduler(&self) -> &Self::Scheduler
Returns a reference to the implementation of the Scheduler this platform wants the kernel to use.
sourcefn scheduler_timer(&self) -> &Self::SchedulerTimer
fn scheduler_timer(&self) -> &Self::SchedulerTimer
Returns a reference to the implementation of the SchedulerTimer timer for this platform.