I am in a soup. The idea may be bad but i do need a solution.
I have two condition variable, say A and B.
Threads 1, 2 and 3 are waiting on A. Thread 4 is waiting on B.
B will be pthread_cond-signal() by thread 2, that is thread 4 will be signaled to wake up by thread 2.
Now, I have another thread 5 which pthread_cond_broadcasts() on condition variable A. I need all threads 1, 2 and 3 to wake up before thread 4 wakes up. That is say if thread 2 wakes up and signals on B thread 4 may wake up before thread 3 does, which is not what i want.
Any pointers will be highly appreciated.
thanks