mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 10:54:24 -04:00
fix error messages
This commit is contained in:
parent
a673b4367a
commit
2834641b49
@ -48,7 +48,12 @@ INLINE void ConditionVarPosixImpl::
|
||||
wait() {
|
||||
TAU_PROFILE("ConditionVarPosixImpl::wait()", " ", TAU_USER);
|
||||
int result = pthread_cond_wait(&_cvar, &_mutex._lock);
|
||||
nassertv(result == 0);
|
||||
#ifndef NDEBUG
|
||||
if (result != 0) {
|
||||
pipeline_cat.error()
|
||||
<< "Unexpected error " << result << " from pthread_cond_wait()\n";
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
@ -41,7 +41,12 @@ wait(double timeout) {
|
||||
ts.tv_nsec += (int)((timeout - seconds) * 1000000.0);
|
||||
|
||||
int result = pthread_cond_timedwait(&_cvar, &_mutex._lock, &ts);
|
||||
nassertv(result == 0 || errno == ETIMEDOUT);
|
||||
#ifndef NDEBUG
|
||||
if (result != 0 && result != ETIMEDOUT) {
|
||||
pipeline_cat.error()
|
||||
<< "Unexpected error " << result << " from pthread_cond_timedwait()\n";
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif // HAVE_POSIX_THREADS
|
||||
|
@ -22,6 +22,7 @@
|
||||
|
||||
#include "mutexPosixImpl.h"
|
||||
#include "pnotify.h"
|
||||
#include "config_pipeline.h"
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user