feat(kernel): add Kernel struct, MockPlatform, and simple syscalls (GetTime, GetProcessId, Yield)
This commit is contained in:
15
crates/kernel/src/interrupt.rs
Normal file
15
crates/kernel/src/interrupt.rs
Normal file
@@ -0,0 +1,15 @@
|
||||
use domain::scheduler::SchedulerDecision;
|
||||
use platform::Platform;
|
||||
use types::id::{CoreId, IrqId, ThreadId};
|
||||
|
||||
use crate::Kernel;
|
||||
|
||||
impl<P: Platform> Kernel<P> {
|
||||
pub fn handle_tick(&mut self, _core: CoreId) -> SchedulerDecision {
|
||||
SchedulerDecision::Continue
|
||||
}
|
||||
|
||||
pub fn handle_interrupt(&mut self, _irq: IrqId) -> Option<ThreadId> {
|
||||
None
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user