Move TaskContext into TCB instead of kstack.

This commit is contained in:
Yifan Wu 2021-07-10 12:35:17 +08:00
parent f1aabb5e0e
commit 92b949a01f
6 changed files with 49 additions and 46 deletions

View file

@ -1,13 +1,9 @@
use super::TaskContext;
#[derive(Copy, Clone)]
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
}
pub task_cx: TaskContext,
}
#[derive(Copy, Clone, PartialEq)]