This tutorial demonstrates Thread Validator detecting your application incorrectly unlocking a critical section that it does not own.
Note that for your executing nativeExample your critical section addresses, thread Ids and sequence numbers will all be different. We have used the values that we experienced to write this tutorial. Substitute your own values where appropriate.