I try to use pthread_cond_wait and find that its return value is always ETIMEDOUT, even the thread is wakened normally. we can easily check the return value here. And I think this test case also needs ...
#include <stdio.h> #define PTW32_STATIC_LIB #define _TIMESPEC_DEFINED #include <pthread.h> pthread_mutex_t wait_mutex = PTHREAD_MUTEX_INITIALIZER; pthread_cond_t wait ...
It took me a while just to track down how to use pthread_cond_wait (). I've tried programming it with what I <I>think</I> is the concept of condition variables, but at this point it's iffy.