#include <ConditionVar.h>
Definition at line 34 of file ConditionVar.h.
Public Types | |
enum | SchedPolicy { NORMAL, ROUND_ROBIN, FIFO } |
Please use this set of constants to define or stablish a thread execution policy. More... | |
Public Member Functions | |
ConditionVar () | |
~ConditionVar () | |
void | signal () |
This will restart just one of the threads that are waiting for the condition to be reached. | |
void | broadcast () |
This will restart all the threads that are waiting for the condition to be reached. | |
void | wait (Mutex *mutex) |
This will unlock the Mutex mutex and will wait for this condition variable to be signaled. | |
void | timedWait (Mutex *mutex, long seconds=1, long nanoseconds=0) |
This will unlock the Mutex mutex and will wait for this condition variable to be signaled. | |
virtual const char * | getClassName () |
Returns the name of the current class. | |
virtual std::string | toString () |
Static Public Member Functions | |
static void | wait (ConditionVar *cv, Mutex *mutex) |
This is the static version of the wait method. | |
static void | timedWait (ConditionVar *cv, Mutex *mutex, long seconds=1, long nanoseconds=0) |
This is the static version of the timedWait method. | |
static void | debugmsg (Object *obj, const char *msg, int linenumber=__LINE__, const char *srcfile=__FILE__) |
Will print a debug message to the screen. | |
static void | debugmsgln (Object *obj, const char *msg, int linenumber=__LINE__, const char *srcfile=__FILE__) |
Protected Member Functions | |
void | init () |
void | destroy () |
Protected Attributes | |
std::string | __cls_name |
Friends | |
std::ostream & | operator<< (std::ostream &stream, const Object &s) |
enum xvr2::Threading::SchedPolicy [inherited] |
Please use this set of constants to define or stablish a thread execution policy.
NORMAL | Default scheduling policy, non-realtime. |
ROUND_ROBIN | Round Robin based realtime scheduling policy. |
FIFO | First In First Out based realtime scheduling policy. |
Definition at line 30 of file Threading.h.
xvr2::ConditionVar::ConditionVar | ( | ) |
xvr2::ConditionVar::~ConditionVar | ( | ) |
void xvr2::ConditionVar::init | ( | ) | [protected] |
void xvr2::ConditionVar::destroy | ( | ) | [protected] |
void xvr2::ConditionVar::signal | ( | ) |
This will restart just one of the threads that are waiting for the condition to be reached.
void xvr2::ConditionVar::broadcast | ( | ) |
This will restart all the threads that are waiting for the condition to be reached.
void xvr2::ConditionVar::wait | ( | Mutex * | mutex | ) |
This will unlock the Mutex mutex and will wait for this condition variable to be signaled.
void xvr2::ConditionVar::timedWait | ( | Mutex * | mutex, | |
long | seconds = 1 , |
|||
long | nanoseconds = 0 | |||
) |
This will unlock the Mutex mutex and will wait for this condition variable to be signaled.
static void xvr2::ConditionVar::wait | ( | ConditionVar * | cv, | |
Mutex * | mutex | |||
) | [static] |
This is the static version of the wait method.
static void xvr2::ConditionVar::timedWait | ( | ConditionVar * | cv, | |
Mutex * | mutex, | |||
long | seconds = 1 , |
|||
long | nanoseconds = 0 | |||
) | [static] |
This is the static version of the timedWait method.
virtual const char* xvr2::Object::getClassName | ( | ) | [virtual, inherited] |
Returns the name of the current class.
static void xvr2::Object::debugmsg | ( | Object * | obj, | |
const char * | msg, | |||
int | linenumber = __LINE__ , |
|||
const char * | srcfile = __FILE__ | |||
) | [static, inherited] |
Will print a debug message to the screen.
static void xvr2::Object::debugmsgln | ( | Object * | obj, | |
const char * | msg, | |||
int | linenumber = __LINE__ , |
|||
const char * | srcfile = __FILE__ | |||
) | [static, inherited] |
virtual std::string xvr2::Object::toString | ( | ) | [virtual, inherited] |
std::ostream& operator<< | ( | std::ostream & | stream, | |
const Object & | s | |||
) | [friend, inherited] |
std::string xvr2::Object::__cls_name [protected, inherited] |