The helix-core IPC subsystem provides three communication mechanisms for kernel components. Channels give you typed, bounded message passing. The Event Bus provides pub/sub broadcasting. The Message Router enables point-to-point RPC between named modules. On the userspace boundary, the syscall framework defines how user programs invoke kernel services.
Channels are typed, bounded MPSC (multi-producer, single-consumer) queues. They're the simplest and most efficient way to pass data between kernel components.
core/src/ipc/channel.rs
122rust
1
// Bounded MPSC channel — multiple senders, one receiver
The event bus is a publish-subscribe system for broadcasting events across the kernel. Components subscribe to specific topics and receive matching events asynchronously. This is how timer ticks, process lifecycle events, and memory pressure notifications propagate through the system.
Subscriptions use a builder pattern with topic filters and priority levels. High-priority subscribers are called first, allowing security hooks to inspect events before they reach normal handlers.
core/src/ipc/event_bus.rs
rust
1
// Subscribe to events
2
letsubscription=EventSubscription::new(
3
"my_handler",
4
vec![EventTopic::Timer,EventTopic::Process],
5
Box::new(|event|{
6
matchevent{
7
Event::ProcessCreated{pid,..}=>{
8
log::info!("New process: {}",pid);
9
EventResponse::Handled
10
}
11
_=>EventResponse::Ignored
12
}
13
})
14
)
15
.with_priority(SubscriptionPriority::High);
16
17
letid=global_event_bus().subscribe(subscription);
18
19
// Publish events — all matching subscribers are notified
The message router provides point-to-point RPC between named kernel modules. Unlike the event bus (broadcast), the router delivers requests to a specific target and returns a response.
The syscall framework defines the ABI boundary between userspace and kernel. Every system call is a numbered handler that receives raw register values and returns a result.
Hooks let you add security auditing or tracing to every syscall without modifying individual handlers. The validation builder ensures user pointers are safe before dereferencing.
core/src/syscall/validation.rs
12rust
1
// Pre/post hooks — for security, auditing, tracing
.flags(flags,ALLOWED_MASK)// Only allowed bits set
17
.range(value,0,100)// Value in range
18
.check()?;
Index
The syscall gateway (helix_syscall_entry) is an extern "C" function with #[no_mangle] — the raw ABI entry point that receives register values from the syscall instruction, dispatches through the registry, and returns the result. All user pointer validation happens before any kernel memory is touched.