Function to signal a condition variable. If 'broadcast' is 1, all
threads waiting on 'cond' should be woken; otherwise, only on one
thread is worken. Should return 0 on success, -1 on failure.
This function will only be called while holding the associated
lock for the condition.
Function to signal a condition variable. If 'broadcast' is 1, all threads waiting on 'cond' should be woken; otherwise, only on one thread is worken. Should return 0 on success, -1 on failure. This function will only be called while holding the associated lock for the condition.