µOS++ RTOS C API summary page. More...
Modules | |
| Core & scheduler | |
| C API core & scheduler definitions. | |
| Threads | |
| C API thread definitions. | |
| Clocks | |
| C API clocks definitions. | |
| Condition variables | |
| C API condition variable definitions. | |
| Event flags | |
| C API event flags definitions. | |
| Memory pools | |
| C API memory pool definitions. | |
| Message queues | |
| C API message queue definitions. | |
| Mutexes | |
| C API mutex definitions. | |
| Semaphores | |
| C API semaphore definitions. | |
| Timers | |
| C API timer definitions. | |
| Memory management | |
| C API memory management definitions. | |
Main Thread Function | |
| int | os_main (int argc, char *argv[]) |
| Application entry point, running on the main thread context. | |
errno getter/setter | |
| int * | __errno (void) |
| Per-thread error support. | |
µOS++ RTOS C API summary page.
The C API maps most of the basic C++ functionality to C programmers. Usually the overhead is minimal, one function call. The object pointer is passsed as the first parameter. The names are prefixed with a unique string inspired by the namespace qualifier.
To use the C API, include the <cmsis-plus/rtos/os-c-api.h> header.
| int * __errno | ( | void | ) |
Per-thread error support.
Standard C libraries define errno as a macro to a function returning a pointer. This function returns such a pointer, specific to each thread.
Definition at line 657 of file os-core.cpp.
| int os_main | ( | int | argc, |
| char * | argv[] | ||
| ) |
Application entry point, running on the main thread context.
| argc | Count of arguments. |
| argv | Array of string arguments. |
| 0 | The program terminated normally. |
| 1 | The program terminated with an error. |
If the application does not define a main() function but defines os_main(), the µOS++ RTOS will automatically provide a main() function that starts the main thread and calls os_main() within this context.
The returned value is used in semihosted tests, to inform the host on the result of the test.