µOS++ IIIe Reference 7.0.0
The third edition of µOS++, a POSIX inspired open source framework, written in C++
Loading...
Searching...
No Matches
µOS++ RTOS C API

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

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.

Returns
Pointer to per-thread errno value.

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

◆ os_main()

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