vdr 2.6.1
|
#include <thread.h>
Public Member Functions | |
cCondWait (void) | |
~cCondWait () | |
bool | Wait (int TimeoutMs=0) |
void | Signal (void) |
cCondWait (void) | |
~cCondWait () | |
bool | Wait (int TimeoutMs=0) |
void | Signal (void) |
Static Public Member Functions | |
static void | SleepMs (int TimeoutMs) |
static void | SleepMs (int TimeoutMs) |
Private Attributes | |
pthread_mutex_t | mutex |
pthread_cond_t | cond |
bool | signaled |
Definition at line 19 of file include/vdr/thread.h.
cCondWait::cCondWait | ( | void | ) |
cCondWait::cCondWait | ( | void | ) |
cCondWait::~cCondWait | ( | ) |
void cCondWait::Signal | ( | void | ) |
Signals a caller of Wait() that the condition it is waiting for is met.
Definition at line 100 of file thread.c.
References cond, mutex, and signaled.
Referenced by cRingBuffer::EnableGet(), cRingBuffer::EnablePut(), cNonBlockingFileReader::Request(), and cNonBlockingFileReader::~cNonBlockingFileReader().
void cCondWait::Signal | ( | void | ) |
Signals a caller of Wait() that the condition it is waiting for is met.
|
static |
Creates a cCondWait object and uses it to sleep for TimeoutMs milliseconds, immediately giving up the calling thread's time slice and thus avoiding a "busy wait".
In order to avoid a possible busy wait, TimeoutMs will be automatically limited to values >2.
Definition at line 72 of file thread.c.
Referenced by cCuttingThread::Action(), cTSBuffer::Action(), cDvbPlayer::Action(), cDvbSubtitleConverter::Action(), cLircRemote::Action(), cRecordingsHandler::Action(), cTrueColorDemo::Action(), cDirCopier::Action(), cThread::Cancel(), cIndexFile::cIndexFile(), cPipe::Close(), CutRecording(), cRcuRemote::DetectCode(), GenerateIndex(), cRecordControl::GetEvent(), cLockFile::Lock(), cMenuSetupCAM::Menu(), cCiMMI::Process(), cInterface::QueryKeys(), cTransfer::Receive(), cVideoDirectoryScannerThread::ScanVideoDir(), cDvbSdFfDevice::SetDigitalAudioDevice(), cThread::Start(), cRecordings::Update(), cDiseqc::Wait(), cCamSlots::WaitForAllCamSlotsReady(), cDevice::WaitForAllDevicesReady(), and cSVDRPServerHandler::WaitUntilReady().
|
static |
Creates a cCondWait object and uses it to sleep for TimeoutMs milliseconds, immediately giving up the calling thread's time slice and thus avoiding a "busy wait".
In order to avoid a possible busy wait, TimeoutMs will be automatically limited to values >2.
bool cCondWait::Wait | ( | int | TimeoutMs = 0 | ) |
Waits at most TimeoutMs milliseconds for a call to Signal(), or forever if TimeoutMs is 0.
Returns true if Signal() has been called, false if the given timeout has expired.
Definition at line 78 of file thread.c.
References cond, GetAbsTime(), mutex, and signaled.
Referenced by cNonBlockingFileReader::Action(), SleepMs(), cRingBuffer::WaitForGet(), and cRingBuffer::WaitForPut().
bool cCondWait::Wait | ( | int | TimeoutMs = 0 | ) |
|
private |
Definition at line 22 of file include/vdr/thread.h.
Referenced by cCondWait(), Signal(), Wait(), and ~cCondWait().
|
private |
Definition at line 21 of file include/vdr/thread.h.
Referenced by cCondWait(), Signal(), Wait(), and ~cCondWait().
|
private |
Definition at line 23 of file include/vdr/thread.h.
Referenced by cCondWait(), Signal(), and Wait().