lock struct