sys_yield tests worked on qemu.
This commit is contained in:
parent
3f3e6b2b99
commit
adbe671fe1
10 changed files with 134 additions and 53 deletions
18
os/src/task/task.rs
Normal file
18
os/src/task/task.rs
Normal file
|
@ -0,0 +1,18 @@
|
|||
pub struct TaskControlBlock {
|
||||
pub task_cx_ptr: usize,
|
||||
pub task_status: TaskStatus,
|
||||
}
|
||||
|
||||
impl TaskControlBlock {
|
||||
pub fn get_task_cx_ptr2(&self) -> *const usize {
|
||||
&self.task_cx_ptr as *const usize
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, PartialEq)]
|
||||
pub enum TaskStatus {
|
||||
UnInit,
|
||||
Ready,
|
||||
Running,
|
||||
Exited,
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue