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

#include <read_write_lock.hpp>

Inheritance diagram for cpp_freertos::ReadWriteLockPreferWriter:
cpp_freertos::ReadWriteLock

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
 

Detailed Description

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

Constructor & Destructor Documentation

◆ ReadWriteLockPreferWriter()

ReadWriteLockPreferWriter::ReadWriteLockPreferWriter ( )

Our derived constructor.

◆ ~ReadWriteLockPreferWriter()

ReadWriteLockPreferWriter::~ReadWriteLockPreferWriter ( )
virtual

Our derived destructor.

Member Function Documentation

◆ ReaderLock()

void ReadWriteLockPreferWriter::ReaderLock ( )
virtual

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

Implements cpp_freertos::ReadWriteLock.

◆ ReaderUnlock()

void ReadWriteLockPreferWriter::ReaderUnlock ( )
virtual

Unlock the Reader.

Implements cpp_freertos::ReadWriteLock.

◆ WriterLock()

void ReadWriteLockPreferWriter::WriterLock ( )
virtual

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

Implements cpp_freertos::ReadWriteLock.

◆ WriterUnlock()

void ReadWriteLockPreferWriter::WriterUnlock ( )
virtual

Unlock the Writer.

Implements cpp_freertos::ReadWriteLock.


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