Added missing initialization of mutex attribute call.

This commit is contained in:
crs 2004-04-06 22:09:38 +00:00
parent bede6352c1
commit 619dd75f0d
1 changed files with 3 additions and 1 deletions

View File

@ -295,7 +295,9 @@ CArchMutex
CArchMultithreadPosix::newMutex() CArchMultithreadPosix::newMutex()
{ {
pthread_mutexattr_t attr; pthread_mutexattr_t attr;
int status = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE); int status = pthread_mutexattr_init(&attr);
assert(status == 0);
status = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
assert(status == 0); assert(status == 0);
CArchMutexImpl* mutex = new CArchMutexImpl; CArchMutexImpl* mutex = new CArchMutexImpl;
status = pthread_mutex_init(&mutex->m_mutex, &attr); status = pthread_mutex_init(&mutex->m_mutex, &attr);