TDME2 1.9.121
Public Member Functions | Private Attributes | List of all members
ReadWriteLock Class Reference

Implementation for read/write lock. More...

#include <tdme/os/threading/ReadWriteLock.h>

Collaboration diagram for ReadWriteLock:
Collaboration graph

Public Member Functions

 ReadWriteLock (const string &name)
 Public constructor. More...
 
 ~ReadWriteLock ()
 Destroys the read write lock. More...
 
void readLock ()
 Locks for reading / shared lock. More...
 
void writeLock ()
 Locks for writing / exclusive lock. More...
 
void unlock ()
 Unlocks this read write lock. More...
 

Private Attributes

string name
 
pthread_rwlock_t pReadWriteLock
 

Detailed Description

Implementation for read/write lock.

Author
Andreas Drewke

Definition at line 21 of file ReadWriteLock.h.

Constructor & Destructor Documentation

◆ ReadWriteLock()

ReadWriteLock ( const string &  name)

Public constructor.

Parameters
namename

Definition at line 12 of file ReadWriteLock.cpp.

◆ ~ReadWriteLock()

Destroys the read write lock.

Definition at line 21 of file ReadWriteLock.cpp.

Member Function Documentation

◆ readLock()

void readLock ( )

Locks for reading / shared lock.

Definition at line 29 of file ReadWriteLock.cpp.

◆ unlock()

void unlock ( )

Unlocks this read write lock.

Definition at line 47 of file ReadWriteLock.cpp.

◆ writeLock()

void writeLock ( )

Locks for writing / exclusive lock.

Definition at line 38 of file ReadWriteLock.cpp.

Member Data Documentation

◆ name

string name
private

Definition at line 49 of file ReadWriteLock.h.

◆ pReadWriteLock

pthread_rwlock_t pReadWriteLock
private

Definition at line 53 of file ReadWriteLock.h.


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