µ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.h File Reference

Single file µOS++ RTOS definitions. More...

Go to the source code of this file.

Namespaces

 os
 System namespace.
 
 os::rtos
 RTOS namespace.
 
 os::rtos::interrupts
 Interrupts namespace.
 
 os::rtos::scheduler
 Scheduler namespace.
 

Functions

thread::threads_list & os::rtos::scheduler::children_threads (thread *th)
 Get the children threads. More...
 
template<typename T , typename ... Args>
std::enable_if<!std::is_array< T >::value, std::shared_ptr< T > >::type os::rtos::make_shared (Args &&... args)
 Create an object that is owned by a shared_ptr and is allocated using the RTOS system allocator. More...
 
class thread::stack * os::rtos::interrupts::stack (void)
 Get the interrupts stack. More...
 

Detailed Description

Single file µOS++ RTOS definitions.

The code was originally inspired by ARM CMSIS <cmsis_os.h> file, v1.02, and tries to remain functionally close to the CMSIS specifications.

References are to C++ Standard ISO/IEC 14882:2011(E) Third edition (2011-09-01).

Major improvements:

  • no more macros required to define objects
  • allow static memory allocations for all objects
  • very close to POSIX (IEEE Std 1003.1, 2013 Edition)
  • specifically designed to facilitate the implementation of C++ standard thread library (ISO/IEC 14882:2011)
  • standard POSIX errors definitions used
  • improved usability, by defining both simple (using defaults) and complex (using attributes) object constructors (feature inspired by POSIX threads attributes)
  • improved readability with explicit three-fold waiting functions (for example: lock(), try-lock(), timed-lock(), similar to POSIX threads)
  • POSIX condition variable added
  • versatile clocks added (Systick_clock, Realtime_clock)
  • all object can wait using either Systick or Realtime_clock

Differences from POSIX:

  • timeouts are relative, while in POSIX are absolute. Rationale: although internally it may be easier to compare absolute dates, it looked more convenient for the user to enter short durations instead of very large absolute times.

Definition in file os.h.