Wrote do_waitpid
set cur thread in sched_switch