IntrOS is free, simple and tiny cooperative operating system (OS) designed for deeply embedded applications. The API is available in C (functions, macros and types described in the topics below) and in C++ (classes in the namespace intros, e.g. intros::Semaphore).
Topics
- system: Basic definitions, System, Clock, Critical section
- synchronization: Spin lock, Once flag, Event, Signal, Flag, Barrier, Semaphore, Mutex, Condition variable, Read/write lock
- communication: List, Memory pool, Raw buffer, Message queue, Mailbox queue, Event queue, Job queue
- tasks: Timer, Task, Hierarchical state machine
Conventions
- every object has its own prefix, e.g. semaphore: type sem_t, functions sem_*, macros OS_SEM, static_SEM, SEM_INIT and SEM_CREATE
- waitFor functions wait for given duration of time, waitUntil functions until given time point, wait functions indefinitely; time is counted in ticks of the system timer (USEC, MSEC, SEC, ...)
- the functions return the error codes described in Basic definitions (E_SUCCESS, E_TIMEOUT, ...)
- Async aliases are intended for communication with unmasked interrupt handlers
Porting
The port layer and how to write a new port: Porting IntrOS
Sources, examples and templates: https://github.com/stateos