pthread_mutex_lock (&m_pMutex); if (status != ST_STOPPED && status != ST_ERROR) { pthread_cond_wait (&m_pSemaphore, &m_pMutex); } pthread_mutex_unlock (&m_pMutex);