- // we need to really wait, create a new mutex for this
- pthread_mutex_t *mutex = new pthread_mutex_t;
- if ( pthread_mutex_init(mutex, (pthread_mutexattr_t *)NULL) != 0 )
- {
- // not supposed to happen
- wxFAIL_MSG( _T("pthread_mutex_init() failed when starting waiting") );
- }
-
- // lock the mutex before starting to wait on it
- pthread_mutex_lock(mutex);
-
- // lock the list before modifying it
- wxMutexList::Node *mutexNode;
- {
- MutexLock lockList(m_mutexListContents);
-
- mutexNode = m_mutexes.Append(mutex);
- }