#include <syncthrd.h>
Inheritance diagram for PIntCondMutex:
Construction | |
enum | Operation { LT, LE, EQ, GE, GT } |
defines possible operators on current value and target value More... | |
PIntCondMutex (int value=0, int target=0, Operation operation=LE) | |
Public Types | |
Public Member Functions | |
Overrides from class PObject | |
void | PrintOn (ostream &strm) const |
Condition access functions | |
virtual BOOL | Condition () |
operator int () const | |
PIntCondMutex & | operator= (int newval) |
PIntCondMutex & | operator++ () |
PIntCondMutex & | operator+= (int inc) |
PIntCondMutex & | operator-- () |
PIntCondMutex & | operator-= (int dec) |
Protected Attributes | |
int | value |
int | target |
Operation | operation |
|
defines possible operators on current value and target value
|
|
Create a cond mutex using an integer
|
|
This is the condition that must be met for the WaitCondition() function to acquire the mutex.
Implements PCondMutex. |
|
Get the current value of the condition variable.
|
|
Increment condition value. Use the Wait() function to acquire the mutex, modify the value, then release the mutex, possibly releasing the thread in the WaitCondition() function if the condition was met by the operation.
|
|
Add to condition value. Use the Wait() function to acquire the mutex, modify the value, then release the mutex, possibly releasing the thread in the WaitCondition() function if the condition was met by the operation.
|
|
Decrement condition value. Use the Wait() function to acquire the mutex, modify the value, then release the mutex, possibly releasing the thread in the WaitCondition() function if the condition was met by the operation.
|
|
Subtract from condition value. Use the Wait() function to acquire the mutex, modify the value, then release the mutex, possibly releasing the thread in the WaitCondition() function if the condition was met by the operation.
|
|
Assign new condition value. Use the Wait() function to acquire the mutex, modify the value, then release the mutex, possibly releasing the thread in the WaitCondition() function if the condition was met by the operation.
|
|
Print the object on the stream. This will be of the form #"(value < target)"#. Reimplemented from PObject. |
|
|
|
|
|
|