#include <wefts_os_base.h>
Inheritance diagram for Wefts::OSConditionBase:
Public Methods | |
virtual void | signal ()=0 |
Signal a pthread condition. | |
virtual bool | wait (OSMutexBase &mtx, CleanupItem guard)=0 |
Waiting for a condition (giving off an already held mutex). | |
virtual bool | timedWait (OSMutexBase &mtx, long seconds, long nanoseconds, CleanupItem guard)=0 |
Timed wait. | |
Protected Methods | |
OSConditionBase () | |
Intializes pthread condition. |
Supposition about OS condition that must be respected by implementations:
|
Intializes pthread condition.
|
|
Signal a pthread condition.
Implemented in Wefts::OSConditionPthread, and Wefts::OSConditionWindows. |
|
Timed wait.
Implemented in Wefts::OSConditionPthread, and Wefts::OSConditionWindows. |
|
Waiting for a condition (giving off an already held mutex). The mutex must be held on entrance. Also notice that the guard parameter is passed by value to make a copy of it in the thread stack, so that, after return of the function (and subquesent unlocking of the mutex), another thread can change safely the guard object, and still the cleanup function for this thread will refer to the desired one.
Implemented in Wefts::OSConditionPthread, and Wefts::OSConditionWindows. |