Browse Source

pthread_cond_timedwait returns its errno value

David Rose 16 years ago
parent
commit
4e9902fab3
2 changed files with 2 additions and 2 deletions
  1. 1 1
      direct/src/plugin/p3dConditionVar.cxx
  2. 1 1
      direct/src/plugin/p3dWinSplashWindow.cxx

+ 1 - 1
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
 }

+ 1 - 1
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.