⚠️ VeridianOS Kernel Documentation - This is low-level kernel code. All functions are unsafe unless explicitly marked otherwise. no_std

veridian_kernel/ipc/
mod.rs

1//! Inter-Process Communication (IPC) subsystem for VeridianOS
2//!
3//! This module implements high-performance IPC mechanisms including:
4//! - Synchronous message passing with < 5μs latency
5//! - Asynchronous channels for streaming
6//! - Zero-copy shared memory transfers
7//! - Capability-based security integration
8
9pub mod async_channel;
10pub mod cap_transfer;
11pub mod capability;
12pub mod channel;
13pub mod error;
14pub mod fast_path;
15pub mod message;
16pub mod message_passing;
17pub mod perf;
18pub mod posix_shm;
19pub mod rate_limit;
20pub mod registry;
21pub mod rpc;
22pub mod shared_memory;
23pub mod sync;
24pub mod zero_copy;
25
26#[cfg(test)]
27mod tests;
28
29// Re-export core types
30pub use async_channel::AsyncChannel;
31pub use capability::{EndpointId, IpcCapability, IpcPermissions, Permission, ProcessId};
32pub use channel::{Channel, Endpoint};
33pub use error::{IpcError, Result};
34pub use message::{LargeMessage, Message, SmallMessage};
35pub use perf::{cycles_to_ns, measure_ipc_operation};
36pub use rate_limit::RateLimits;
37// Re-export internal functions for tests
38#[cfg(test)]
39pub use registry::lookup_endpoint;
40pub use registry::{
41    create_channel, create_endpoint, get_registry_stats, remove_process_endpoints,
42    validate_capability,
43};
44pub use shared_memory::{Permissions, SharedRegion, TransferMode};
45#[cfg(test)]
46pub use sync::send_message;
47pub use sync::{sync_call, sync_receive, sync_reply, sync_send};
48
49pub use crate::arch::entropy::read_timestamp;
50
51/// IPC system initialization
52pub fn init() {
53    kprintln!("[IPC] Initializing IPC system...");
54
55    // Initialize the global IPC registry
56    registry::init();
57
58    kprintln!("[IPC] IPC system initialized");
59}