20 #ifndef COIL_CONDITION_H 21 #define COIL_CONDITION_H 25 #include <coil/Mutex.h> 58 cv->
sema_ = ::CreateSemaphore (NULL,
216 bool wait(
long second,
long nano_second = 0)
218 DWORD milli_second = second * 1000 + nano_second / 1000000;
256 result = SignalObjectAndWait (external_mutex->
mutex_, cv->
sema_, aMilliSecond,
FALSE);
299 ::WaitForSingleObject (external_mutex->
mutex_, 0);
332 ReleaseSemaphore (cv->
sema_, 1, 0);
361 int have_waiters = 0;
398 #endif // COIL_CONDITION_H
int pthread_cond_broadcast(pthread_cond_t *cv)
Resume of all the thread practice.
int pthread_cond_wait(coil::pthread_cond_t *cv, coil::Mutex *external_mutex, DWORD aMilliSecond)
Wait of the thread practice.
ACE_thread_mutex_t mutex_
Condition(M &mutex)
Constructor.
Condition & operator=(const Mutex &)
void broadcast()
Resume of all the thread practice.
coil::Mutex waiters_count_lock_
int pthread_cond_signal(pthread_cond_t *cv)
Resume of the thread practice.
static int pthread_cond_init(pthread_cond_t *cv)
coil::pthread_cond_t m_cond
bool wait(long second, long nano_second=0)
Thread practice wait of set time.
void signal()
Resume of the thread practice.
Common Object Interface Layer.
bool wait()
Wait of the thread practice.