title: Does pthread_cond_wait(&cond_t, &mutex); unlock and then lock the mutex?
body: <p>I m using <code>pthread_cond_wait(&amp;cond_t, &amp;mutex);</code> in my program and I m wondering why this function need as a second parameter a mutex variable.</p>
  
  <p>Does the <code>pthread_cond_wait()</code> unlock the mutex at the beggining (beggining of the execution <code>pthread_cond_wait()</code>)  and then locked when it finish (just before leaving <code>pthread_cond_wait()</code>)?</p>