finishing lab1_readwrite_lock.c