| S3FC project page | S3FC home page |
pthread_cond_t.
More...
#include <s3_condition.h>
Public Methods | |
| s3_condition () | |
| Default constructor: instantiate a new mutex. More... | |
| ~s3_condition () | |
| Destructor: destroy the mutex primitive. More... | |
| void | wait (const s3_mutex &mutex) const |
Unlock mutex (as per s3_mutex::unlock() ) and wait. More... | |
| void | signal () const |
| Signal the condition to a single (and arbitrary) thread waiting on the conditional. More... | |
| void | broadcast () const |
| Signal the condition to all threads waiting on the conditional. More... | |
Protected Methods | |
| s3_condition (const s3_condition &src) | |
Copy constructor: private for your convenience (thou shalt not copy construct an s3_condition - deal with it). More... | |
| s3_condition & | operator= (const s3_condition &src) |
Neither shalt thou copy assign an s3_condition. More... | |
Protected Attributes | |
| pthread_cond_t | cond |
| The condition variable. More... | |
pthread_cond_t.
A condition is a synchronisation primitive that allows a process to relinquish control of a shared resource until a condition is signalled, in which case it regains control of the resource. A condition variable is always associated with a mutex, that protects a shared resource. The condition supports the following operations:
wait: Atomically unlock a specified mutex and wait for the condition to be signalled. If the condition is signalled, lock the mutex and proceed. More than one thread may be waiting on a single conditional.
Definition at line 55 of file s3_condition.h.
|
|
Default constructor: instantiate a new mutex.
Definition at line 45 of file s3_condition.cc. References cond. |
|
|
Destructor: destroy the mutex primitive.
Definition at line 52 of file s3_condition.cc. References cond, and CONST_OVERRIDE_COND_T. |
|
|
Copy constructor: private for your convenience (thou shalt not copy construct an
|
|
|
Signal the condition to all threads waiting on the conditional.
Definition at line 77 of file s3_condition.cc. References cond, and CONST_OVERRIDE_COND_T. |
|
|
Neither shalt thou copy assign an
|
|
|
Signal the condition to a single (and arbitrary) thread waiting on the conditional.
Definition at line 71 of file s3_condition.cc. References cond, and CONST_OVERRIDE_COND_T. |
|
|
Unlock
If the condition is signalled re-acquire the mutex (as per Definition at line 63 of file s3_condition.cc. References cond, CONST_OVERRIDE_COND_T, CONST_OVERRIDE_MUTEX_T, and s3_mutex::mutex. Referenced by s3_inplace_fifo_mux::stub_queue::lock_select. |
|
|
The condition variable.
Definition at line 61 of file s3_condition.h. Referenced by broadcast, s3_condition, signal, wait, and ~s3_condition. |
| Send comments to: s3fc@stonethree.com |
|