Add generic locks