It seems that the current implementation of pthread_cond does not properly capture cases where one would forget to signal or broadcast the waiters.
The implementation of pthread_cond_signal points to pthread_cond_brodcast. The implementation of pthread_cond_broadcast is empty. The implementation of pthread_cond_wait is a pthread_mutex_unlock(); pthread_mutex_lock();. That is actually quite simple and nice. It can already capture some issues. But as said above, it actually always enventually wake up every waiter.
It seems that the current implementation of
pthread_conddoes not properly capture cases where one would forget to signal or broadcast the waiters.The implementation of
pthread_cond_signalpoints topthread_cond_brodcast. The implementation ofpthread_cond_broadcastis empty. The implementation ofpthread_cond_waitis apthread_mutex_unlock(); pthread_mutex_lock();. That is actually quite simple and nice. It can already capture some issues. But as said above, it actually always enventually wake up every waiter.