Added unlock functions to defs.h