FreeRTOS Addons
|
#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 () |
virtual void | ReaderLock ()=0 |
virtual void | ReaderUnlock ()=0 |
virtual void | WriterLock ()=0 |
virtual void | WriterUnlock ()=0 |
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.
ReadWriteLockPreferWriter::ReadWriteLockPreferWriter | ( | ) |
Our derived constructor.
|
virtual |
Our derived destructor.
|
virtual |
Take the lock as a Reader. This allows multiple reader access.
Implements cpp_freertos::ReadWriteLock.
|
virtual |
Unlock the Reader.
Implements cpp_freertos::ReadWriteLock.
|
virtual |
Take the lock as a Writer. This allows only one thread access.
Implements cpp_freertos::ReadWriteLock.
|
virtual |
Unlock the Writer.
Implements cpp_freertos::ReadWriteLock.