Understanding Lock Functions