Use LockLint to do static analysis of the use of mutex and read/write locks. In searching for inconsistent lock use, LockLint detects the most common causes of data races and deadlocks.