FreeRTOS C++ Wrappers  1.6.0
C++ interface to FreeRTOS
Public Member Functions | List of all members
cpp_freertos::ReadWriteLockPreferReader Class Reference

#include <read_write_lock.hpp>

Inheritance diagram for cpp_freertos::ReadWriteLockPreferReader:
Inheritance graph
[legend]
Collaboration diagram for cpp_freertos::ReadWriteLockPreferReader:
Collaboration graph
[legend]

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 ()
 

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.

Definition at line 182 of file read_write_lock.hpp.

Member Function Documentation

◆ ReaderLock()

void ReadWriteLockPreferReader::ReaderLock ( )
virtual

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

Implements cpp_freertos::ReadWriteLock.

Definition at line 89 of file cread_write_lock.cpp.

◆ ReaderUnlock()

void ReadWriteLockPreferReader::ReaderUnlock ( )
virtual

Unlock the Reader.

Implements cpp_freertos::ReadWriteLock.

Definition at line 102 of file cread_write_lock.cpp.

◆ WriterLock()

void ReadWriteLockPreferReader::WriterLock ( )
virtual

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

Implements cpp_freertos::ReadWriteLock.

Definition at line 115 of file cread_write_lock.cpp.

◆ WriterUnlock()

void ReadWriteLockPreferReader::WriterUnlock ( )
virtual

Unlock the Writer.

Implements cpp_freertos::ReadWriteLock.

Definition at line 121 of file cread_write_lock.cpp.


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