title: Segmentation fault in multithreaded application
body: <p>I have a Segmentation fault in my multithreaded application that is becoming a headache. It looks like the problem is being generated in a <em>usleep</em> call. I tried to replace it with <em>nanosleep</em> but it persists. It also appears near to a sem_timedwait call.</p>
  
  <p>I compile with gcc and -lpthread option.</p>
  
  <p>Might this be the cause of the segmentation fault? What could be the reason?</p>