Portos, The World's Smallest RTOS
Portos works without Tasks, Mailboxes, Semaphores
How it works?
Your critical functions: give them a high priority level, and they will preempt lower priority functions
Easily select the priority level by adding one argument, po_priority:
void rotate_eye(po_priority(HIGH), double angle) {...}
void print_in_background(po_priority(LOW), char *format, int a, int b) {...}
The Portos preprocessor and scheduler will do the rest of the job
There are no inter-task communications
You save stack space, context switches, inter-task messages
Memory footprint is 1 to 2 KB
Super Fast
Novel, extremely fast scheduler (that doesn't use tasks)
Novel and extremely efficient dynamic memory allocation
No interrupt locking (depending on desired version)
Super Easy
The same argument you use to assign a priority level, you can reuse it to assign a time, a signal, a queue:
rotate_eye(po_time(123), 0.5);
search_satellites(po_signal(LOST), Satellites *s, int length);
The above functions are automatically called when time is 123 or when LOST signal is received. They automatically execute at the predefined priority level
If you really need tasks, functions can be quickly grouped (or ungrouped) into supertasks (not yet implemented)
Less number of lines in your code, lower number of bugs, faster time to market
If your project has a unique thread, you can try Portos to easily add priority levels, which allows you to reduce processor speed
Examples
You can see the simplicity and power of Portos by looking at these short examples
Supported Platforms
First version is now available as add-on for DSP/BIOS of Texas Instruments. It runs on all DSPs supported by DSP/BIOS.
Standalone version for ARM processor is under development.
C language and MS Windows are currently supported.