Create thread_with_lock.c