µ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::interrupts::lockable Class Reference

Interrupts standard locker. More...

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

Public Member Functions

Constructors & Destructor
constexpr lockable ()
 Construct an interrupts lock.
 
 ~lockable ()
 Destruct the interrupts lock.
 
Public Member Functions
void lock (void)
 Lock the interrupts.
 
bool try_lock (void)
 Try to lock the interrupts.
 
void unlock (void)
 Unlock the interrupts.
 

Detailed Description

Locker meeting the standard Lockable requirements (30.2.5.3).

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

Constructor & Destructor Documentation

◆ lockable()

constexpr os::rtos::interrupts::lockable::lockable ( )
constexpr
Parameters
None.
Note
Can be invoked from Interrupt Service Routines.

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

1185 : state_ (port::interrupts::state::init)
1186 {
1187 }

◆ ~lockable()

os::rtos::interrupts::lockable::~lockable ( )
inline
Note
Can be invoked from Interrupt Service Routines.

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

1193 {
1194 }

Member Function Documentation

◆ lock()

void os::rtos::interrupts::lockable::lock ( void  )
inline
Parameters
None.
Returns
Nothing.
Note
Can be invoked from Interrupt Service Routines.

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

1201 {
1202 state_ = critical_section::enter ();
1203 }
static state_t enter(void)
Enter an interrupts critical section.
Definition os-sched.h:1128

References os::rtos::interrupts::critical_section::enter().

◆ try_lock()

bool os::rtos::interrupts::lockable::try_lock ( void  )
inline
Parameters
None.
Return values
trueThe interrupts were locked.

Somehow redundant, since the lock will always succeed; but used to meet the Lockable requirements.

Note
Can be invoked from Interrupt Service Routines.

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

1214 {
1215 state_ = critical_section::enter ();
1216 return true;
1217 }

References os::rtos::interrupts::critical_section::enter().

◆ unlock()

void os::rtos::interrupts::lockable::unlock ( void  )
inline
Parameters
None.
Returns
Nothing.
Note
Can be invoked from Interrupt Service Routines.

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

1224 {
1225 critical_section::exit (state_);
1226 }
static void exit(state_t state)
Exit the interrupts critical section.
Definition os-sched.h:1137

References os::rtos::interrupts::critical_section::exit().


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