Directory Structure
Contents
mck/ ├─ include/ │ ├─ core.h │ ├─ drivers.h │ ├─ modules.h │ ├─ utils/ │ ├─ math/ │ ├─ log/ │ ├─ config/ │ ├─ debug/ │ ├─ buffer/ │ ├─ bit/ │ ├─ table/ │ └─ time/ ├─ src/ │ ├─ core/ │ ├─ drivers/ │ ├─ modules/ │ ├─ utils/ │ ├─ math/ │ ├─ log/ │ ├─ config/ │ ├─ debug/ │ ├─ buffer/ │ ├─ bit/ │ ├─ table/ │ └─ time/ ├─ asm/ │ ├─ x86/ │ │ ├─ boot/ │ │ ├─ cpu/ │ │ ├─ mem/ │ │ └─ util/ │ └─ x64/ │ ├─ boot/ │ ├─ cpu/ │ ├─ mem/ │ └─ util/ ├─ cpp/ │ ├─ core/ │ └─ utils/ ├─ kernel/ │ ├─ arch/ │ │ └─ x86_64/ │ ├─ mm/ │ ├─ sched/ │ ├─ debug/ │ ├─ init.c │ └─ kernel.h ├─ ld/ │ └─ kernel.ld ├─ tools/ ├─ build/ └─ docs/
Core Concepts
Core (C89)
The core provides:
- fixed-size integer types
- result codes
- logging callback
- initialization state
It contains no platform-specific code and no standard library dependencies.
Drivers
Drivers are defined by a name and an initialization function. They are stored in a static registry and initialized in order.
Modules
Modules follow the same structure as drivers and are initialized after them.
Utilities
mck includes:
- memory utilities (set, copy, arena allocator)
- static lists
- string utilities
- math helpers
- bitsets
- ring buffers
- hash tables
- event queues
These components are designed for environments without dynamic allocation.
Time System
A minimal time system provides:
- tick counter
- millisecond uptime
- second uptime
It is hardware-agnostic and can be driven by any timer interrupt.