title: Threads trying to acquire pthread_mutex_lock(&mutex) What happens if they don't get the lock?
body: <p>C Programming:</p>
  
  <p>What happens when a thread tries to acquire a mutex lock, and fails to get it?</p>
  
  <p>Does it go to sleep?</p>
  
  <p>Will the thread be woken up when pthread_mutex_unlock(&amp;mutex); is called?</p>
  
  <p>Then try to obtain the lock again?</p>