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

Scheduler standard locker. More...

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

Public Member Functions

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

Detailed Description

Locker meeting the standard Lockable requirements (30.2.5.3).

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

Constructor & Destructor Documentation

◆ lockable()

constexpr os::rtos::scheduler::lockable::lockable ( )
constexpr
Parameters
None.
Warning
Cannot be invoked from Interrupt Service Routines.

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

965 : state_ (port::scheduler::state::init)
966 {
967 }

◆ ~lockable()

os::rtos::scheduler::lockable::~lockable ( )
inline
Warning
Cannot be invoked from Interrupt Service Routines.

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

973 {
974 }

Member Function Documentation

◆ lock()

void os::rtos::scheduler::lockable::lock ( void  )
inline
Parameters
None.
Returns
Nothing.
Warning
Cannot be invoked from Interrupt Service Routines.

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

981 {
982 state_ = scheduler::lock ();
983 }
state_t lock(void)
Lock the scheduler.
Definition os-sched.h:871

References os::rtos::scheduler::lock().

◆ try_lock()

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

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

Warning
Cannot be invoked from Interrupt Service Routines.

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

994 {
995 state_ = scheduler::lock ();
996 return true;
997 }

References os::rtos::scheduler::lock().

◆ unlock()

void os::rtos::scheduler::lockable::unlock ( void  )
inline
Parameters
None.
Returns
Nothing.
Warning
Cannot be invoked from Interrupt Service Routines.

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

1004 {
1005 scheduler::locked (state_);
1006 }
bool locked(void)
Check if the scheduler is locked.
Definition os-sched.h:858

References os::rtos::scheduler::locked().


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