aboutsummaryrefslogtreecommitdiff
path: root/src/proc/task.rs
blob: 0ff2065f0f8ee351dc1c50f528ec79f2e558536a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
use crate::arch::x86_64::arch_regs;

/// currently only kernelSp and Context are important.
/// the task struct will be placed on the starting addr (low addr) of the kernel stack.
/// therefore we can retrive the task struct at anytime by masking the kernel stack
#[repr(C)]
#[repr(packed)]
pub struct Task {
	pub task_id: u32,
	pub kernel_stack: u64,
	pub user_stack: u64,
	pub context: arch_regs::Context64,
}