Add some more locking functions.