Subj : breakdown To : comp.programming.threads From : fabrizio Date : Fri Feb 11 2005 05:28 pm Hello, first thread executes : ---- pthread_mutex_lock(&(pFilter->condmut)); while(pFilter->received_packet != TS_PER_UDP) { pthread_cond_wait(&(pFilter->condvar),&(pFilter->condmut)); } memcpy(buffer,pFilter->InBuffer,buffer_size); pFilter->next_packet = pFilter->InBuffer; pFilter->received_packet = 0; pthread_mutex_unlock(&(pFilter->condmut)); ---- second thread executes : ---- pthread_mutex_lock(&condmut); memcpy(next_packet,packet,TSPACKET_SIZE); received_packet++; next_packet += TSPACKET_SIZE; if (received_packet == TS_PER_UDP) { pthread_cond_signal(&condvar); } pthread_mutex_unlock(&condmut); ---- executing this leads to total freeze on my machine. I have to reset it and some files get corrupted. Can you see anything wrong in this code ? Fabrice .