title: Can it be assumed that `pthread_cond_signal` will wake the signaled thread atomically with regards to the mutex bond to the condition variable?
body: <p><a href="http://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_cond_broadcast.html" rel="nofollow noreferrer">Quoting POSIX</a>:</p>
  
  <blockquote>
    <p>The <code>pthread_cond_broadcast()</code> or <code>pthread_cond_signal()</code> functions may be called by a thread whether or not it currently owns the mutex that threads calling <code>pthread_cond_wait()</code> or <code>pthread_cond_timedwait()</code> have associated with the condition variable during their waits; however, if predictable scheduling behavior is required, then that mutex shall be locked by the thread calling <code>pthread_cond_broadcast()</code> or <code>pthread_cond_signal()</code>.</p>
  </blockquote>
  
  <p>"If predictable scheduling behavior is required". This could/would hint that locking the mutex bound to the condition variable right before calling <code>pthread_cond_signal()</code> should guarantee that the signaled thread will be woken up before any other thread manages to lock this mutex. Is this correct?</p>