revise the definition of multiple basic locks in the code

In all cases this is just a change from two volatile int to one.
15 files changed