UCommon
|
The conditional is a common base for other thread synchronizing classes. More...
#include <condition.h>
Static Public Member Functions | |
static pthread_condattr_t * | initializer (void) |
Support function for getting conditional attributes for realtime scheduling. | |
static void | set (struct timespec *hires, timeout_t timeout) |
Convert a millisecond timeout into use for high resolution conditional timers. | |
Protected Member Functions | |
void | broadcast (void) |
Signal the conditional to release all waiting threads. | |
Conditional () | |
Initialize and construct conditional. | |
void | signal (void) |
Signal the conditional to release one waiting thread. | |
bool | wait (struct timespec *timeout) |
Conditional wait for signal on timespec timeout. | |
bool | wait (timeout_t timeout) |
Conditional wait for signal on millisecond timeout. | |
void | wait (void) |
Wait (block) until signalled. | |
~Conditional () | |
Destroy conditional, release any blocked threads. | |
![]() | |
ConditionMutex () | |
Initialize and construct conditional. | |
void | lock (void) |
Lock the conditional's supporting mutex. | |
void | unlock (void) |
Unlock the conditional's supporting mutex. | |
~ConditionMutex () | |
Destroy conditional, release any blocked threads. | |
Protected Attributes | |
pthread_cond_t | cond |
![]() | |
pthread_mutex_t | mutex |
Static Protected Attributes | |
static attribute | attr |
Friends | |
class | autolock |
class | ConditionalAccess |
class | ConditionVar |
class | TimedEvent |
The conditional is a common base for other thread synchronizing classes.
Many of the complex sychronization objects, including barriers, semaphores, and various forms of read/write locks are all built from the conditional. This assures that the minimum functionality to build higher order thread synchronizing objects is a pure conditional, and removes dependencies on what may be optional features or functions that may have different behaviors on different pthread implimentations and platforms.
Definition at line 227 of file condition.h.
|
inlineprotected |
Signal the conditional to release all waiting threads.
Definition at line 292 of file condition.h.
|
inlinestatic |
Support function for getting conditional attributes for realtime scheduling.
Definition at line 316 of file condition.h.
|
static |
Convert a millisecond timeout into use for high resolution conditional timers.
hires | timespec representation to set. |
timeout | to convert. |
|
inlineprotected |
Signal the conditional to release one waiting thread.
Definition at line 285 of file condition.h.
|
protected |
Conditional wait for signal on timespec timeout.
timeout | as a high resolution timespec. |
|
protected |
Conditional wait for signal on millisecond timeout.
timeout | in milliseconds. |
|
inlineprotected |
Wait (block) until signalled.
Definition at line 278 of file condition.h.
|
friend |
Definition at line 307 of file condition.h.
|
friend |
Definition at line 233 of file condition.h.
|
friend |
Definition at line 234 of file condition.h.
|
friend |
Definition at line 253 of file condition.h.
|
staticprotected |
Definition at line 247 of file condition.h.
|
mutableprotected |
Definition at line 250 of file condition.h.