added GlobalLock/GlobalUnlock functions, used e.g. for ticket [ea4e8bd544]
some comments enhancements