From 4e9902fab357fe8fa8efc767cc40d85ce28f803b Mon Sep 17 00:00:00 2001 From: David Rose Date: Tue, 14 Jul 2009 14:54:33 +0000 Subject: [PATCH] pthread_cond_timedwait returns its errno value --- direct/src/plugin/p3dConditionVar.cxx | 2 +- direct/src/plugin/p3dWinSplashWindow.cxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/direct/src/plugin/p3dConditionVar.cxx b/direct/src/plugin/p3dConditionVar.cxx index 27717089ce..63343b325a 100644 --- a/direct/src/plugin/p3dConditionVar.cxx +++ b/direct/src/plugin/p3dConditionVar.cxx @@ -140,7 +140,7 @@ wait(double timeout) { ts.tv_nsec += (int)((timeout - seconds) * 1000000.0); int result = pthread_cond_timedwait(&_cvar, &_lock, &ts); - assert(result == 0 || errno == ETIMEDOUT); + assert(result == 0 || result == ETIMEDOUT); #endif // _WIN32 } diff --git a/direct/src/plugin/p3dWinSplashWindow.cxx b/direct/src/plugin/p3dWinSplashWindow.cxx index a1309f658b..3acbda0cee 100755 --- a/direct/src/plugin/p3dWinSplashWindow.cxx +++ b/direct/src/plugin/p3dWinSplashWindow.cxx @@ -201,7 +201,7 @@ stop_thread() { PostThreadMessage(_thread_id, WM_USER, 0, 0); // We can't actually wait for the thread to finish, since there - // might a deadlock there: the thread can't finish deleting its + // might be a deadlock there: the thread can't finish deleting its // window unless we're pumping the message loop for the parent, // which won't happen if we're sitting here waiting. No worries; we // don't *really* need to wait for the thread.