Kochol Game Engine  0.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
kge::core::KgeCond Class Reference

#include <KgeCond.h>

Public Member Functions

 KgeCond ()
 Constructor.
 ~KgeCond ()
 Destructor.
void Wait (KgeMutex *pMutex)
void Signal ()
 Restart one of the threads that are waiting on the condition variable.
void Broadcast ()
 Restart all threads that are waiting on the condition variable.

Protected Attributes

SDL_cond * m_pCond

Detailed Description

Definition at line 13 of file KgeCond.h.

Constructor & Destructor Documentation

kge::core::KgeCond::KgeCond ( )

Constructor.

kge::core::KgeCond::~KgeCond ( )

Destructor.

Member Function Documentation

void kge::core::KgeCond::Broadcast ( )

Restart all threads that are waiting on the condition variable.

void kge::core::KgeCond::Signal ( )

Restart one of the threads that are waiting on the condition variable.

Referenced by kge::core::TSQueue< Task * >::push().

void kge::core::KgeCond::Wait ( KgeMutex pMutex)

Wait on the condition variable, unlocking the provided mutex.

Warning
The mutex must be locked before entering this function!

The mutex is re-locked once the condition variable is signaled.

Referenced by kge::core::TSQueue< Task * >::wait_and_pop().

Member Data Documentation

SDL_cond* kge::core::KgeCond::m_pCond
protected

Definition at line 41 of file KgeCond.h.


The documentation for this class was generated from the following file: