|
vdr 2.8.3
|
#include <thread.h>
Public Member Functions | |
| cMutex (void) | |
| ~cMutex () | |
| bool | Lock (int TimeoutMs=0, bool *TimedOut=NULL) |
| void | Unlock (void) |
Private Attributes | |
| pthread_mutex_t | mutex |
| std::atomic< tThreadId > | lockThreadId |
| int | locked |
Friends | |
| class | cCondVar |
| cMutex::cMutex | ( | void | ) |
Definition at line 213 of file thread.c.
References locked, lockThreadId, and mutex.
| bool cMutex::Lock | ( | 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 function returns false because of a timeout.
Definition at line 228 of file thread.c.
References GetAbsTime(), locked, lockThreadId, mutex, and cThread::ThreadId().
Referenced by cIoThrottle::Activate(), cEpgHandler::cEpgHandler(), cStatus::cStatus(), cTDT::cTDT(), cVideoDirectory::Current(), cVideoDirectory::cVideoDirectory(), cEvent::DecNumTimers(), cSchedule::DecNumTimers(), cSchedule::DelEvent(), cDevice::Detach(), cDvbTuner::ExecuteDiseqc(), cEvent::IncNumTimers(), cSchedule::IncNumTimers(), cMutexLock::Lock(), cPixmap::Lock(), cRingBufferFrame::Lock(), cThread::Lock(), cSkins::ProcessQueuedMessages(), cSkins::QueueMessage(), cIoThrottle::Release(), cEpgHandler::~cEpgHandler(), cStatus::~cStatus(), and cVideoDirectory::~cVideoDirectory().
| void cMutex::Unlock | ( | void | ) |
Definition at line 252 of file thread.c.
References locked, lockThreadId, and mutex.
Referenced by cIoThrottle::Activate(), cEpgHandler::cEpgHandler(), cStatus::cStatus(), cTDT::cTDT(), cVideoDirectory::Current(), cVideoDirectory::cVideoDirectory(), cEvent::DecNumTimers(), cSchedule::DecNumTimers(), cSchedule::DelEvent(), cDevice::Detach(), cDvbTuner::ExecuteDiseqc(), cEvent::IncNumTimers(), cSchedule::IncNumTimers(), cSkins::ProcessQueuedMessages(), cSkins::QueueMessage(), cIoThrottle::Release(), cPixmap::Unlock(), cRingBufferFrame::Unlock(), cThread::Unlock(), cEpgHandler::~cEpgHandler(), cMutexLock::~cMutexLock(), cStatus::~cStatus(), and cVideoDirectory::~cVideoDirectory().
|
friend |
|
private |
Definition at line 73 of file thread.h.
Referenced by cMutex(), Lock(), cCondVar::TimedWait(), Unlock(), and cCondVar::Wait().
|
private |
Definition at line 72 of file thread.h.
Referenced by cMutex(), Lock(), cCondVar::TimedWait(), Unlock(), and cCondVar::Wait().
|
private |
Definition at line 71 of file thread.h.
Referenced by cMutex(), Lock(), cCondVar::TimedWait(), Unlock(), cCondVar::Wait(), and ~cMutex().