vdr 2.6.1
Public Member Functions | Private Attributes | List of all members
cRwLock Class Reference

#include <thread.h>

Public Member Functions

 cRwLock (bool PreferWriter=false)
 
 ~cRwLock ()
 
bool Lock (bool Write, int TimeoutMs=0)
 
void Unlock (void)
 
 cRwLock (bool PreferWriter=false)
 
 ~cRwLock ()
 
bool Lock (bool Write, int TimeoutMs=0)
 
void Unlock (void)
 

Private Attributes

pthread_rwlock_t rwlock
 
int locked
 
tThreadId writeLockThreadId
 

Detailed Description

Definition at line 55 of file include/vdr/thread.h.

Constructor & Destructor Documentation

◆ cRwLock() [1/2]

cRwLock::cRwLock ( bool  PreferWriter = false)

Definition at line 157 of file thread.c.

References locked, rwlock, and writeLockThreadId.

◆ ~cRwLock() [1/2]

cRwLock::~cRwLock ( )

Definition at line 167 of file thread.c.

References rwlock.

◆ cRwLock() [2/2]

cRwLock::cRwLock ( bool  PreferWriter = false)

◆ ~cRwLock() [2/2]

cRwLock::~cRwLock ( )

Member Function Documentation

◆ Lock() [1/2]

bool cRwLock::Lock ( bool  Write,
int  TimeoutMs = 0 
)

Definition at line 172 of file thread.c.

References GetAbsTime(), locked, rwlock, cThread::ThreadId(), and writeLockThreadId.

Referenced by cStateLock::Lock().

◆ Lock() [2/2]

bool cRwLock::Lock ( bool  Write,
int  TimeoutMs = 0 
)

◆ Unlock() [1/2]

void cRwLock::Unlock ( void  )

Definition at line 194 of file thread.c.

References locked, rwlock, cThread::ThreadId(), and writeLockThreadId.

Referenced by cStateLock::Lock(), and cStateLock::Unlock().

◆ Unlock() [2/2]

void cRwLock::Unlock ( void  )

Member Data Documentation

◆ locked

int cRwLock::locked
private

Definition at line 58 of file include/vdr/thread.h.

Referenced by cRwLock(), Lock(), and Unlock().

◆ rwlock

pthread_rwlock_t cRwLock::rwlock
private

Definition at line 57 of file include/vdr/thread.h.

Referenced by cRwLock(), Lock(), Unlock(), and ~cRwLock().

◆ writeLockThreadId

tThreadId cRwLock::writeLockThreadId
private

Definition at line 59 of file include/vdr/thread.h.

Referenced by cRwLock(), Lock(), and Unlock().


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