Ticket #114: nondebug_mutex_errorcheck.diff
File nondebug_mutex_errorcheck.diff, 0.9 kB (added by slack, 16 years ago) |
---|
-
./src/libutil/PosixMutex.cpp
old new 50 50 #ifdef DEBUG 51 51 pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_ERRORCHECK); 52 52 #else 53 pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_ DEFAULT);53 pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_ERRORCHECK); 54 54 #endif 55 55 pthread_mutex_init(&m_mutex, &attr); 56 56 pthread_mutexattr_destroy(&attr); … … 85 85 pthread_mutex_lock(&m_mutex); 86 86 } 87 87 #else 88 pthread_mutex_lock(&m_mutex); 88 if ( pthread_mutex_lock(&m_mutex) ) { 89 fprintf(stderr, "ERROR: pthread_mutex_lock() failed!!!\n"); 90 } 89 91 #endif 90 92 } 91 93 … … 109 111 this, unlocker); 110 112 #endif 111 113 112 pthread_mutex_unlock(&m_mutex); 114 if ( pthread_mutex_unlock(&m_mutex) ) { 115 fprintf(stderr, "ERROR: pthread_mutex_unlock() failed!!!\n"); 116 } 113 117 } 114 118 115 119 void