Generic lock