Configuration Flexibility and Modularization¶
The criterion. Engineers do not want to pay a resource penalty for features they don’t use: the kernel should compile out unused components, and expose a clean, human-readable way to customize ticks, hooks, and priority levels.
How Revera answers it¶
Revera is minimal-safe by default and scales up by compile-time knobs. Every optional feature is gated by
a TK_CONFIG_* macro that removes both its code and its per-thread struct fields when off — so a build pays
only for what it uses. There is no runtime feature registry: the build flag alone decides. Configuration is
plain, documented header + command-line (no code generation required), and ready-made profiles move
you along the size/safety ladder in one flag. Asking for hardware a target can’t provide fails loud at
compile time — never a silent, broken build.
Feature · how to turn it on · how to use it · where it works¶
Feature |
Turn on with |
Use these APIs |
Where |
|---|---|---|---|
Compile out unused features |
each |
see |
all |
Ready-made profiles |
|
— |
all |
Static object pools (sized) |
|
— |
all |
Kernel policy |
setup |
|
all |
Fail-loud capability gates |
— |
compile-time |
all |
Every knob — values, default, requirements, effect — lives in one place:
kernel/tk_config.h. See also the API reference.
Limits & roadmap¶
Configuration is header +
-D+ profiles — there is no graphical / Kconfig-style configurator (a future codegen path exists in the project’s history: thetkgenYAML→C generator, not in 0.1.0).The chosen profile is part of the ABI (it changes
sizeof(struct tk_tcb)), so build directories are profile-tagged.
Learn more¶
How it works: composability · kernel tiers.
The knobs:
kernel/tk_config.h· profiles/.Full API: API reference.