vdr 2.7.4
cCondWait Class Reference

#include <thread.h>

Public Member Functions

 cCondWait (void)
 
 ~cCondWait ()
 
bool Wait (int TimeoutMs=0)
 
void Signal (void)
 

Static Public Member Functions

static void SleepMs (int TimeoutMs)
 

Private Attributes

pthread_mutex_t mutex
 
pthread_cond_t cond
 
bool signaled
 

Detailed Description

Definition at line 19 of file thread.h.

Constructor & Destructor Documentation

◆ cCondWait()

cCondWait::cCondWait ( void )

Definition at line 58 of file thread.c.

References cond, mutex, and signaled.

Referenced by SleepMs().

◆ ~cCondWait()

cCondWait::~cCondWait ( )

Definition at line 65 of file thread.c.

References cond, and mutex.

Member Function Documentation

◆ Signal()

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.

◆ SleepMs()

◆ Wait()

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 SleepMs().

Member Data Documentation

◆ cond

pthread_cond_t cCondWait::cond
private

Definition at line 22 of file thread.h.

Referenced by cCondWait(), Signal(), Wait(), and ~cCondWait().

◆ mutex

pthread_mutex_t cCondWait::mutex
private

Definition at line 21 of file thread.h.

Referenced by cCondWait(), Signal(), Wait(), and ~cCondWait().

◆ signaled

bool cCondWait::signaled
private

Definition at line 23 of file thread.h.

Referenced by cCondWait(), Signal(), and Wait().


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