feat(kernel): WatchDeath + SetTimer events as notification signals; adapter wakes at earliest deadline
This commit is contained in:
@@ -4,10 +4,9 @@ use types::{
|
||||
address::{EntryPoint, PhysicalAddress, StackPointer, VirtualAddress},
|
||||
id::{CoreId, IrqId, ProcessId},
|
||||
mapping::PagePerms,
|
||||
time::{Ticks, TimerDuration},
|
||||
time::Ticks,
|
||||
};
|
||||
|
||||
use crate::board;
|
||||
use crate::hw::{plic::Plic, timer};
|
||||
use crate::mmu;
|
||||
use crate::smp;
|
||||
@@ -136,9 +135,8 @@ impl Platform for RiscVPlatform {
|
||||
}
|
||||
}
|
||||
|
||||
fn set_timer(&mut self, _duration: TimerDuration) {
|
||||
let now = timer::read_time();
|
||||
timer::set_next(now + board::TICK_INTERVAL);
|
||||
fn wake_at(&mut self, deadline: Ticks) {
|
||||
timer::wake_at(deadline.raw());
|
||||
}
|
||||
|
||||
fn current_ticks(&self) -> Ticks {
|
||||
|
||||
Reference in New Issue
Block a user