pthread_cond_timedwait returns its errno value

This commit is contained in:
David Rose 2009-07-14 14:54:33 +00:00
parent 1bec439304
commit 4e9902fab3
2 changed files with 2 additions and 2 deletions

View File

@ -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
}

View File

@ -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.