You might notice that you have to pass a mutex to pthread_cond_wait, when you are thinking to yourself “Why do I need a mutex when all I want to do is signal a waiting thread?”

This is one of those questions that doesn’t have an immediately obvious answer. Well, you are right that you can just use a dummy mutex and your thread will properly wake up, but if you actually want to signal the thread based on a *boolean condition* (as determined by real C executing code) then you need to pass a meaningful mutex.

Here is a really good explanation of when you would want to do that:

http://www.cs.wustl.edu/~schmidt/win32-cv-1.html

Happy reading.