Added locks.cpp. Added hAutoLock