How can I give the first ownership of a mutex to a thread?
I mean, I have two threads in my applications. thread 2 must wait for thread1 but it doesn't because thread2 runs before and takes the control, so how can I give the control to the other the first time?