Hello All,

I have two threads sharing two resources. I use two mutexes to synchronise them. They are running at differenct prority.

Code:
In first thread,

Acquire A

Acquire B

Use A 

Use B

something like c = A+B

Release B

Release A


In second thread,

Acquire B,

Acquire A,

use A

Use B

something like c = A+B

Release A

Release B
To avoid race condition objetcs are aquired and released in same order. Now if somebody has coded the application like this.

Race condition may occur or may not occur depending upon when this condition will occur. So we see application getting hung.

Anybody knows test condition that tells for sure that race condition has occured and is because of these variables?

Please let me know...

This is not homework