INOS
CINOSReadWriteLock Class Reference

#include <inos_syn.h>

Public Member Functions

void ReadLock ()
 
void ReadUnlock ()
 
void WriteLock ()
 
void WriteUnlock ()
 

Detailed Description

Reader writer lock. It allows multiple readers (but no writer) to lock a resource at the same time, but only allows one writer (and no readers). This is often useful for seldom changing resources.

Member Function Documentation

◆ ReadLock()

void CINOSReadWriteLock::ReadLock ( )
inline

Call this function to "read lock" a resource. I.e. the caller wants to access the resource without modifying it. The caller will be locked if a "writer lock" is already taken.

◆ ReadUnlock()

void CINOSReadWriteLock::ReadUnlock ( )
inline

Undo ReadLock()

◆ WriteLock()

void CINOSReadWriteLock::WriteLock ( )
inline

Call this function to "write lock" a resource. I.e. the caller wants to delete or otherwise modify the resource. The caller will be blocked if "read locks" are taken or if another task already owns the "write lock".

◆ WriteUnlock()

void CINOSReadWriteLock::WriteUnlock ( )
inline

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