feat(kernel): seL4-style IPC, notifications, status ABI
- badges + Mint, Call/Reply/ReplyRecv w/ gen-checked reply slot - cap transfer (1/msg, copy, needs Delegate, rechecked at delivery) - notifications: signal/wait/poll/bind, irq -> notification routing - WaitAny/WaitForInterrupt removed; a0=status, ErrorCode - libkos: single ecall primitive, compat wrappers + typed new api - fix: trap return clobbered user t0 on every trap - fix: wait queues FIFO, delegate keeps badge, fault cap checked - docs/ipc.md spec, ipc tests, ipc fuzz, kani ntfn + waitqueue
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
use domain::scheduler::{Scheduler, SchedulerDecision};
|
||||
use platform::Platform;
|
||||
use types::id::{CoreId, IrqId, ThreadId};
|
||||
use types::id::CoreId;
|
||||
|
||||
use crate::Kernel;
|
||||
|
||||
@@ -53,22 +53,4 @@ impl<P: Platform> Kernel<P> {
|
||||
self.scheduler.tick(core, current_tid)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn handle_interrupt(&mut self, irq: IrqId) -> Option<ThreadId> {
|
||||
self.platform.mask_irq(irq);
|
||||
|
||||
let tid = self.irqs.owner(irq)?;
|
||||
let thread = self.threads.get_mut(tid).ok()?;
|
||||
|
||||
if !matches!(thread.state(), domain::thread::ThreadState::Blocked(_)) {
|
||||
return None;
|
||||
}
|
||||
|
||||
let priority = thread.priority();
|
||||
let core = self.platform.core_id();
|
||||
let _ = thread.unblock();
|
||||
self.scheduler.add(tid, priority, core);
|
||||
|
||||
Some(tid)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user