Expand description
N1 Type-Safe IPC : annotation macro and kernel-internal wiring.
The N1 (TypeSafe) isolation level guarantees that communicating
components share the same address space (Ring 0) and that every
module tagged #[n1_safe] contains zero unsafe blocks.
This is verified by cargo-geiger in CI; the macro itself is a
documentation + compile-time annotation marker.
§Usage
use crate::ipc::n1::n1_safe;
#[n1_safe]
/// This function is N1-safe: no raw pointers, no `asm!`, no FFI.
fn notify_scheduler(event: N1Event) { /* safe code only */ }§Kernel-internal N1 channels
The following kernel component pairs use IntrusiveMailbox for
zero-copy kernel-internal IPC (N1):
| Producer | Consumer | Channel | Purpose |
|---|---|---|---|
| NIC IRQ | Scheduler | NIC_SCHED_MAILBOX | Link up/down events |
| Scheduler | NIC | SCHED_NIC_MAILBOX | Flow control hints |
Enums§
- N1Event
- Events that can flow over N1 kernel-internal channels.
Statics§
- NIC_
SCHED_ MAILBOX - Mailbox for NIC => scheduler notifications (link up/down, backpressure).
- SCHED_
NIC_ MAILBOX - Mailbox for Scheduler => NIC flow-control hints.
Functions§
- init
- Initialise N1 subsystem: pre-allocate mailbox nodes for IRQ-safe push. Must be called once at kernel init (after heap is available).