Simple mutex and conditional variable signal in C
Needs volatile keyword
The way your program is written, predicate_value needs to be a volatile int instead of a normal int.  This is because you are reading it without locking the mutex in main(), and writing to it in do_work() from another thread.
Another way to avoid the problem is to ensure that you only ever read the variable with the mutex locked.