Public Member Functions |
void | access (void) |
| Access mode shared thread scheduling.
|
void | commit (void) |
| Complete exclusive mode write scheduling.
|
| ConditionalAccess () |
| Initialize and construct conditional.
|
void | limit_sharing (unsigned max) |
| Specify a maximum sharing (access) limit.
|
void | modify (void) |
| Exclusive mode write thread scheduling.
|
void | release (void) |
| Release access mode read scheduling.
|
| ~ConditionalAccess () |
| Destroy conditional, release any blocked threads.
|
Protected Member Functions |
void | broadcast (void) |
| Signal the conditional to release all broadcast threads.
|
void | lock (void) |
| Lock the conditional's supporting mutex.
|
void | signal (void) |
| Signal the conditional to release one signalled thread.
|
void | unlock (void) |
| Unlock the conditional's supporting mutex.
|
bool | waitBroadcast (timeout_t timeout) |
| Conditional wait for broadcast on millisecond timeout.
|
bool | waitBroadcast (struct timespec *timeout) |
| Conditional wait for broadcast on timespec timeout.
|
void | waitBroadcast (void) |
| Wait (block) until broadcast.
|
bool | waitSignal (timeout_t timeout) |
| Conditional wait for signal on millisecond timeout.
|
bool | waitSignal (struct timespec *timeout) |
| Conditional wait for signal on timespec timeout.
|
void | waitSignal (void) |
| Wait (block) until signalled.
|
Static Protected Member Functions |
static void | gettimeout (timeout_t timeout, struct timespec *hires) |
| Convert a millisecond timeout into use for high resolution conditional timers.
|
Protected Attributes |
pthread_cond_t | bcast |
unsigned | pending |
unsigned | sharing |
unsigned | waiting |
The conditional rw seperates scheduling for optizming behavior or rw locks.
This varient of conditonal seperates scheduling read (broadcast wakeup) and write (signal wakeup) based threads. This is used to form generic rwlock's as well as the specialized condlock.
- Author:
- David Sugar <dyfet@gnutelephony.org>
Definition at line 213 of file thread.h.