Skip to content

[os4-ref] fix : TaskStatus in kernel is different from TaskStatus in user mode. #77

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 14, 2022

Conversation

zhaiqiming
Copy link
Contributor

在当前的 os4-ref 代码中, 内核中赋值为TaskStatus::Running的字段将被在用户态错误解释为TaskStatus::Ready
原因是TaskStatus的实现不同:
用户态中TaskStatus:
pub enum TaskStatus { UnInit, Ready, Running, Exited, }
内核中TaskStatus:
pub enum TaskStatus { Ready, Running, Exited, }

@zhaiqiming
Copy link
Contributor Author

这会导致ch3_taskinfo.rs中的assert!(info.status == TaskStatus::Running)失败

@chyyuu chyyuu merged commit ca8f42e into LearningOS:main Jul 14, 2022
@chyyuu
Copy link
Member

chyyuu commented Jul 14, 2022

Good work! Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants