vdr
1.7.27
|
#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 17 of file include/vdr/thread.h.
cCondWait::cCondWait | ( | void | ) |
cCondWait::cCondWait | ( | void | ) |
void cCondWait::Signal | ( | void | ) |
Signals a caller of Wait() that the condition it is waiting for is met.
Definition at line 85 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 void cCondWait::SleepMs | ( | int | TimeoutMs | ) | [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.
void cCondWait::SleepMs | ( | int | TimeoutMs | ) | [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 57 of file thread.c.
Referenced by cLircRemote::Action(), cSectionHandler::Action(), cDvbSubtitleConverter::Action(), cTrueColorDemo::Action(), cDvbPlayer::Action(), cThread::Cancel(), cIndexFile::CatchUp(), cIndexFile::cIndexFile(), cPipe::Close(), CutRecording(), cRcuRemote::DetectCode(), GenerateIndex(), cRecordControl::GetEvent(), cLockFile::Lock(), cMenuSetupCAM::Menu(), cInterface::QueryKeys(), cTransfer::Receive(), cDvbSdFfDevice::SetDigitalAudioDevice(), cThread::Start(), cDiseqc::Wait(), and cDevice::WaitForAllDevicesReady().
bool cCondWait::Wait | ( | int | TimeoutMs = 0 | ) |
Waits at most TimeoutMs milliseconds for a call to Signal(), or forever if TimeoutMs is 0.
Definition at line 63 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 | ) |
pthread_cond_t cCondWait::cond [private] |
Definition at line 20 of file include/vdr/thread.h.
Referenced by cCondWait(), Signal(), Wait(), and ~cCondWait().
pthread_mutex_t cCondWait::mutex [private] |
Definition at line 19 of file include/vdr/thread.h.
Referenced by cCondWait(), Signal(), Wait(), and ~cCondWait().
bool cCondWait::signaled [private] |
Definition at line 21 of file include/vdr/thread.h.
Referenced by cCondWait(), Signal(), and Wait().