FreeRTOS C++ Wrappers
1.6.0
C++ interface to FreeRTOS
|
#include <read_write_lock.hpp>
Public Member Functions | |
ReadWriteLock () | |
virtual | ~ReadWriteLock () |
virtual void | ReaderLock ()=0 |
virtual void | ReaderUnlock ()=0 |
virtual void | WriterLock ()=0 |
virtual void | WriterUnlock ()=0 |
Protected Attributes | |
int | ReadCount |
SemaphoreHandle_t | ReadLock |
SemaphoreHandle_t | ResourceLock |
Abstract base class encapsulating a Reader/Writer lock.
These locks are based on mutexs and cannot be used in any way from ISR context. Likewise, these locks block indefinitely.
Definition at line 110 of file read_write_lock.hpp.
ReadWriteLock::ReadWriteLock | ( | ) |
Constructor
ReadWriteLockCreateException | on failure. |
Definition at line 46 of file cread_write_lock.cpp.
|
virtual |
Destructor
Definition at line 82 of file cread_write_lock.cpp.
|
pure virtual |
Take the lock as a Reader. This allows multiple reader access.
Implemented in cpp_freertos::ReadWriteLockPreferWriter, and cpp_freertos::ReadWriteLockPreferReader.
|
pure virtual |
Unlock the Reader.
Implemented in cpp_freertos::ReadWriteLockPreferWriter, and cpp_freertos::ReadWriteLockPreferReader.
|
pure virtual |
Take the lock as a Writer. This allows only one thread access.
Implemented in cpp_freertos::ReadWriteLockPreferWriter, and cpp_freertos::ReadWriteLockPreferReader.
|
pure virtual |
Unlock the Writer.
Implemented in cpp_freertos::ReadWriteLockPreferWriter, and cpp_freertos::ReadWriteLockPreferReader.
|
protected |
How many active readers are there.
Definition at line 162 of file read_write_lock.hpp.
|
protected |
Protect ReadCount.
Definition at line 167 of file read_write_lock.hpp.
|
protected |
Protect this resource from multiple writer access, or from Reader access when a writer is changing something.
Definition at line 173 of file read_write_lock.hpp.