mirror of
https://github.com/rcore-os/rCore-Tutorial-v3.git
synced 2024-11-22 09:26:26 +04:00
TaskStatus::Blocking->Blocked
This commit is contained in:
parent
794ba8f7a6
commit
29585b7982
@ -48,7 +48,7 @@ pub fn suspend_current_and_run_next() {
|
|||||||
pub fn block_current_task() -> *mut TaskContext {
|
pub fn block_current_task() -> *mut TaskContext {
|
||||||
let task = take_current_task().unwrap();
|
let task = take_current_task().unwrap();
|
||||||
let mut task_inner = task.inner_exclusive_access();
|
let mut task_inner = task.inner_exclusive_access();
|
||||||
task_inner.task_status = TaskStatus::Blocking;
|
task_inner.task_status = TaskStatus::Blocked;
|
||||||
&mut task_inner.task_cx as *mut TaskContext
|
&mut task_inner.task_cx as *mut TaskContext
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -76,5 +76,5 @@ impl TaskControlBlock {
|
|||||||
pub enum TaskStatus {
|
pub enum TaskStatus {
|
||||||
Ready,
|
Ready,
|
||||||
Running,
|
Running,
|
||||||
Blocking,
|
Blocked,
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user