vdr 2.8.3
cMutexLock Class Reference

#include <thread.h>

Public Member Functions

 cMutexLock (cMutex *Mutex=NULL)
 ~cMutexLock ()
bool Lock (cMutex *Mutex, int TimeoutMs=0, bool *TimedOut=NULL)

Private Attributes

cMutex * mutex
bool locked

Detailed Description

Definition at line 150 of file thread.h.

Constructor & Destructor Documentation

◆ cMutexLock()

cMutexLock::cMutexLock ( cMutex * Mutex = NULL)

Definition at line 422 of file thread.c.

References Lock(), locked, and mutex.

Referenced by cPixmapMutexLock::cPixmapMutexLock().

◆ ~cMutexLock()

cMutexLock::~cMutexLock ( )

Definition at line 429 of file thread.c.

References locked, mutex, and cMutex::Unlock().

Member Function Documentation

◆ Lock()

bool cMutexLock::Lock ( cMutex * Mutex,
int TimeoutMs = 0,
bool * TimedOut = NULL )

Returns true if the mutex was successfully locked.

If TimeoutMs is greater than 0, waits up to the given number of milliseconds before giving up and returning false. If TimeoutMs is 0, waits indefinitely. If TimedOut is given, it will be set to true if the returns false because of a timeout.

Definition at line 435 of file thread.c.

References cMutex::Lock(), locked, and mutex.

Referenced by cMutexLock(), and cControl::Control().

Member Data Documentation

◆ locked

bool cMutexLock::locked
private

Definition at line 153 of file thread.h.

Referenced by cMutexLock(), Lock(), and ~cMutexLock().

◆ mutex

cMutex* cMutexLock::mutex
private

Definition at line 152 of file thread.h.

Referenced by cMutexLock(), cPixmapMutexLock::cPixmapMutexLock(), Lock(), and ~cMutexLock().


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