1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
use VirtualAddress;
#[derive(Debug)]
#[repr(C, packed)]
pub struct TaskStateSegment {
reserved_1: u32,
pub privilege_stack_table: [VirtualAddress; 3],
reserved_2: u64,
pub interrupt_stack_table: [VirtualAddress; 7],
reserved_3: u64,
reserved_4: u16,
pub iomap_base: u16,
}
impl TaskStateSegment {
pub const fn new() -> TaskStateSegment {
TaskStateSegment {
privilege_stack_table: [VirtualAddress(0); 3],
interrupt_stack_table: [VirtualAddress(0); 7],
iomap_base: 0,
reserved_1: 0,
reserved_2: 0,
reserved_3: 0,
reserved_4: 0,
}
}
}