µ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::scheduler::uncritical_section Class Reference

Scheduler uncritical section RAII helper. More...

#include <cmsis-plus/rtos/os.h>

Public Member Functions

Constructors & Destructor
 uncritical_section ()
 Enter a critical section.
 
 ~uncritical_section ()
 Exit a critical section.
 

Detailed Description

Definition at line 244 of file os-sched.h.

Constructor & Destructor Documentation

◆ uncritical_section()

os::rtos::scheduler::uncritical_section::uncritical_section ( )
inline
Parameters
None.

Lock the scheduler and remember the initial scheduler state.

Warning
Cannot be invoked from Interrupt Service Routines.

Definition at line 940 of file os-sched.h.

940 : state_ (unlock ())
941 {
942#if defined(OS_TRACE_RTOS_SCHEDULER)
943 trace::printf ("{U ");
944#endif
945 }
int printf(const char *format,...)
Write a formatted string to the trace device.
Definition trace.cpp:59
state_t unlock(void)
Unlock the scheduler.
Definition os-sched.h:884

References os::trace::printf().

◆ ~uncritical_section()

os::rtos::scheduler::uncritical_section::~uncritical_section ( )
inline

Restore the initial scheduler state and possibly unlock the scheduler.

Warning
Cannot be invoked from Interrupt Service Routines.

Definition at line 954 of file os-sched.h.

955 {
956#if defined(OS_TRACE_RTOS_SCHEDULER)
957 trace::printf (" U}");
958#endif
959 locked (state_);
960 }
bool locked(void)
Check if the scheduler is locked.
Definition os-sched.h:858

References os::rtos::scheduler::locked(), and os::trace::printf().


The documentation for this class was generated from the following file: