FreeRTOS C++ Wrappers
1.6.0
C++ interface to FreeRTOS
|
#include <read_write_lock.hpp>
Public Member Functions | |
ReadWriteLockPreferWriter () | |
virtual | ~ReadWriteLockPreferWriter () |
virtual void | ReaderLock () |
virtual void | ReaderUnlock () |
virtual void | WriterLock () |
virtual void | WriterUnlock () |
Public Member Functions inherited from cpp_freertos::ReadWriteLock | |
ReadWriteLock () | |
virtual | ~ReadWriteLock () |
Private Attributes | |
int | WriteCount |
SemaphoreHandle_t | WriteLock |
SemaphoreHandle_t | BlockReadersLock |
Additional Inherited Members | |
Protected Attributes inherited from cpp_freertos::ReadWriteLock | |
int | ReadCount |
SemaphoreHandle_t | ReadLock |
SemaphoreHandle_t | ResourceLock |
Concrete derived class that implements a Reader/Writer lock that favors the Writers. That is, with enough aggressive writers, a Reader may starve.
Definition at line 219 of file read_write_lock.hpp.
ReadWriteLockPreferWriter::ReadWriteLockPreferWriter | ( | ) |
Our derived constructor.
Definition at line 127 of file cread_write_lock.cpp.
|
virtual |
Our derived destructor.
Definition at line 164 of file cread_write_lock.cpp.
|
virtual |
Take the lock as a Reader. This allows multiple reader access.
Implements cpp_freertos::ReadWriteLock.
Definition at line 171 of file cread_write_lock.cpp.
|
virtual |
Unlock the Reader.
Implements cpp_freertos::ReadWriteLock.
Definition at line 186 of file cread_write_lock.cpp.
|
virtual |
Take the lock as a Writer. This allows only one thread access.
Implements cpp_freertos::ReadWriteLock.
Definition at line 199 of file cread_write_lock.cpp.
|
virtual |
Unlock the Writer.
Implements cpp_freertos::ReadWriteLock.
Definition at line 214 of file cread_write_lock.cpp.
|
private |
Lock to stop reader threads from starving a Writer.
Definition at line 280 of file read_write_lock.hpp.
|
private |
Number of Writers waiting for the Resource Lock, including any current Writer already holdign it.
Definition at line 270 of file read_write_lock.hpp.
|
private |
Protect WriteCount.
Definition at line 275 of file read_write_lock.hpp.