µOS++ IIIe / CMSIS++ / POSIX++ Reference  v6.3.11
“Perfekt ist nicht gut genug”
The third edition of µOS++ and CMSIS++, a proposal for the next generation CMSIS, written in C++.
CMSIS++ RTOS C API

CMSIS++ 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. More...
 

errno getter/setter

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

Detailed Description

CMSIS++ 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

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.

Returns
Pointer to per-thread errno value.

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

int os_main ( int  argc,
char *  argv[] 
)

Application entry point, running on the main thread context.

Parameters
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 CMSIS++ 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.