#endif
m_extant = true;
}
-}
+}
-void
+void
Thread::wait()
{
if (m_extant) {
ReleaseMutex(m_mutex);
}
-void
+void
Condition::wait(int us)
{
if (us == 0) {
DWORD ms = us / 1000;
if (us > 0 && ms == 0) ms = 1;
-
+
#ifdef DEBUG_CONDITION
cerr << "CONDITION DEBUG: " << (void *)GetCurrentThreadId() << ": Timed waiting on " << &m_condition << " \"" << m_name << "\"" << endl;
#endif
#endif
m_extant = true;
}
-}
+}
-void
+void
Thread::wait()
{
if (m_extant) {
pthread_mutex_unlock(&m_mutex);
}
-void
+void
Condition::wait(int us)
{
if (us == 0) {
struct timespec timeout;
timeout.tv_sec = now.tv_sec;
timeout.tv_nsec = now.tv_usec * 1000;
-
+
#ifdef DEBUG_CONDITION
cerr << "CONDITION DEBUG: " << (void *)pthread_self() << ": Timed waiting on " << &m_condition << " \"" << m_name << "\"" << endl;
#endif
Thread::start()
{
abort();
-}
+}
-void
+void
Thread::wait()
{
abort();
abort();
}
-void
+void
Condition::wait(int us)
{
abort();