FreeRTOS Addons
Loading...
Searching...
No Matches
Public Member Functions | List of all members
cpp_freertos::ReadWriteLockPreferReader Class Reference

#include <read_write_lock.hpp>

Inheritance diagram for cpp_freertos::ReadWriteLockPreferReader:
cpp_freertos::ReadWriteLock

Public Member Functions

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
 

Detailed Description

Concrete derived class that implements a Reader/Writer lock that favors the Readers. That is, with enough aggressive readers, a Writer may starve.

Member Function Documentation

◆ ReaderLock()

void ReadWriteLockPreferReader::ReaderLock ( )
virtual

Take the lock as a Reader. This allows multiple reader access.

Implements cpp_freertos::ReadWriteLock.

◆ ReaderUnlock()

void ReadWriteLockPreferReader::ReaderUnlock ( )
virtual

Unlock the Reader.

Implements cpp_freertos::ReadWriteLock.

◆ WriterLock()

void ReadWriteLockPreferReader::WriterLock ( )
virtual

Take the lock as a Writer. This allows only one thread access.

Implements cpp_freertos::ReadWriteLock.

◆ WriterUnlock()

void ReadWriteLockPreferReader::WriterUnlock ( )
virtual

Unlock the Writer.

Implements cpp_freertos::ReadWriteLock.


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