By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,378 Members | 3,020 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,378 IT Pros & Developers. It's quick & easy.

Thread Synchronisation problem

P: 9
I am doing a real time project. In that, I need 4threads to be synchronized each other one after the other. In that i am facing a problem of buffer overwrite.

I am using a 2D buffer [10][1000].Once i stored data into it, i signaled the second thread. The problem here is that the first thread signal is missed by the second thread. Here the processing of the second thread is more that the first..

So if the first thread reaches the 3rd buffer the second buffer reach only the 2nd buffer. If it continues for sometime the data in the buffers got overwrites. So I need help to avoid this overwrite problem.

Reply me as soon as possible
Sep 17 '06 #1
Share this Question
Share on Google+
1 Reply

P: 44
For thread synchronization it is much more easy if you use locks (mutexes) instead of "raw" signals.
Sep 20 '06 #2

Post your reply

Sign in to post your reply or Sign up for a free account.