Extend and unify locking flags in utilties.