dtmail: remove DEAD_WOOD code
This commit is contained in:
@@ -368,91 +368,6 @@ Condition::waitTrue(void)
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef DEAD_WOOD
|
||||
void
|
||||
Condition::waitFalse(void)
|
||||
{
|
||||
// Wait for the condition to become true.
|
||||
//
|
||||
#if defined(POSIX_THREADS)
|
||||
MutexLock lock_scope(_mutex);
|
||||
|
||||
while(_state) {
|
||||
cond_wait((cond_t *)_condition, (mutex_t *)_mutex);
|
||||
}
|
||||
#else
|
||||
_state = 0;
|
||||
#endif
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void
|
||||
Condition::waitFor(int new_state)
|
||||
{
|
||||
// Wait for the condition to become true.
|
||||
//
|
||||
#if defined(POSIX_THREADS)
|
||||
MutexLock lock_scope(_mutex);
|
||||
|
||||
while(_state != new_state) {
|
||||
cond_wait((cond_t *)_condition, (mutex_t *)_mutex);
|
||||
}
|
||||
#endif
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void
|
||||
Condition::waitGT(int new_state)
|
||||
{
|
||||
// Wait for the condition to become true.
|
||||
//
|
||||
#if defined(POSIX_THREADS)
|
||||
MutexLock lock_scope(_mutex);
|
||||
|
||||
while(_state > new_state) {
|
||||
cond_wait((cond_t *)_condition, (mutex_t *)_mutex);
|
||||
}
|
||||
#endif
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void
|
||||
Condition::waitLT(int new_state)
|
||||
{
|
||||
// Wait for the condition to become true.
|
||||
//
|
||||
#if defined(POSIX_THREADS)
|
||||
MutexLock lock_scope(_mutex);
|
||||
|
||||
while(_state < new_state) {
|
||||
cond_wait((cond_t *)_condition, (mutex_t *)_mutex);
|
||||
}
|
||||
#endif
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void
|
||||
Condition::waitProcStatus(void)
|
||||
{
|
||||
// Wait for the condition to become true.
|
||||
//
|
||||
#if defined(POSIX_THREADS)
|
||||
MutexLock lock_scope(_mutex);
|
||||
|
||||
while(_state < 0) {
|
||||
cond_wait((cond_t *)_condition, (mutex_t *)_mutex);
|
||||
}
|
||||
#else
|
||||
_state = 0;
|
||||
#endif
|
||||
|
||||
return;
|
||||
}
|
||||
#endif /* DEAD_WOOD */
|
||||
|
||||
Thread
|
||||
ThreadCreate(
|
||||
|
||||
Reference in New Issue
Block a user