Expand description
Core kernel mechanisms for reovim.
Linux equivalent: kernel/
This crate provides pure mechanisms without I/O. Drivers and modules implement policies using these primitives.
§Usage
All public APIs are accessed via the api::v1 module:
ⓘ
use reovim_kernel::api::v1::*;
// Check API compatibility
check_api_version(Version::new(1, 0, 0))?;
// Use kernel types
let bus = EventBus::new();
pr_info!("kernel initialized");§Subsystems
Internal subsystems (not directly accessible):
sched: Scheduler and runtime (Linux:kernel/sched/)mm: Memory management / buffers (Linux:mm/)ipc: Inter-process communication / events (Linux:ipc/)core: Core primitives (motion, text objects, commands)block: Block operations (undo, transactions)printk: Kernel logging (Linux:kernel/printk/)debug: Tracing and metricspanic: Panic handling and recovery
All subsystem types are re-exported through api::v1.
Modules§
Macros§
- define_
tracepoint - Define a trace point.
- pr_
debug - Logs a message at the Debug level.
- pr_err
- Logs a message at the Error level.
- pr_info
- Logs a message at the Info level.
- pr_
trace - Logs a message at the Trace level.
- pr_warn
- Logs a message at the Warn level.
- profile
- Profile a scope and record to histogram (legacy macro).
- profile_
counter - Increment a counter metric via the global profiler.
- profile_
fn - Profile a function (uses module path as target).
- profile_
histogram - Record a histogram sample via the global profiler.
- profile_
scope - Profile a scope with the
Profilertrait. - trace_
event - Emit a trace event if the trace point is enabled.