FreeRTOScpp
Loading...
Searching...
No Matches
Lockable Class Referenceabstract

A Base class to provide block based locking capability. More...

#include <Lock.h>

Inheritance diagram for Lockable:

Public Member Functions

 Lockable ()
 
virtual ~Lockable ()
 
virtual bool give ()=0
 
virtual bool take (TickType_t wait=portMAX_DELAY)=0
 

Private Member Functions

 Lockable (Lockable const &)=delete
 We are not copyable.
 
void operator= (Lockable const &)=delete
 We are not assignable.
 

Detailed Description

A Base class to provide block based locking capability.

Any object that supports "Locking" should be derived from Lockable (like a Semaphore or Mutex)

Such objects need to provide an interface consisting of

Constructor & Destructor Documentation

◆ Lockable() [1/2]

Lockable::Lockable ( )
inline

◆ ~Lockable()

virtual Lockable::~Lockable ( )
inlinevirtual

◆ Lockable() [2/2]

Lockable::Lockable ( Lockable const & )
privatedelete

We are not copyable.

Member Function Documentation

◆ give()

virtual bool Lockable::give ( )
pure virtual

Implemented in BinarySemaphore, Mutex, Reader, RecursiveMutex, and Writer.

Referenced by Lock::~Lock(), and Lock::unlock().

Here is the caller graph for this function:

◆ operator=()

void Lockable::operator= ( Lockable const & )
privatedelete

We are not assignable.

◆ take()

virtual bool Lockable::take ( TickType_t wait = portMAX_DELAY)
pure virtual

Implemented in BinarySemaphore, Mutex, Reader, RecursiveMutex, and Writer.

Referenced by Lock::lock().

Here is the caller graph for this function:

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