fix bug of thread_resume() and yield() system call.