Declare lock struct and thread library in user.h