Hi
I need clarification regarding a code segment which in brief waitsfor a signal, but can receive signals from multiple threads. Just to clarify my stmt here is the code segment (outline)

process()
{
.... pthread_cond_wait.... //--> waiting for the signal
/*remaining part of code*/
}

callback_func1()
{
...pthread_cond_signal.. //--> assume thread1 calls this function and it signals the waiting thread
}

callback_func2()
{
...pthread_cond_signal.. //-->assume thread2 calls this function and it also signals thewaiting thread
}

I understand that callback functions gets executed under their respective calling thread scope i.e. callback_func1() when called will get executed as part of Thread1.
When Thread1 calls callback_func1() and it signals the condition, the main thread is awakened and continues to execute /*remaining part of code*/ in process() func.
At this point if Thread2 calls callback_func2() and it also signals the condition.
I am not very clear what happens now, Please clarify me in this scenario.
1. Since the main thread is already awakened and is not in wait state I am under the assumption that the signal by Thread2 after calling callback_func2() will be missed permanently.
2. How should I solve this problems, i.e. both the threads should have their signals processed. None of thread after sending the signal should miss out to execute the /*remaining part of code*/