µOS++ IIIe Reference  v6.3.15
“Perfekt ist nicht gut genug”
The third edition of µOS++, a POSIX inspired open source system, written in C++.

µOS++ RTOS C API summary page. More...


 Core & scheduler
 C API core & scheduler definitions.
 C API thread definitions.
 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.
 C API mutex definitions.
 C API semaphore definitions.
 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. More...

errno getter/setter

int * __errno (void)
 Per-thread error support. More...

Detailed Description

µ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.

Function Documentation

◆ __errno()

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.

Pointer to per-thread errno value.

Definition at line 646 of file os-core.cpp.

◆ os_main()

int os_main ( int  argc,
char *  argv[] 

Application entry point, running on the main thread context.

argcCount of arguments.
argvArray of string arguments.
Return values
0The program terminated normally.
1The 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.