diff options
| author | Tianhao Wang <shrik3@mailbox.org> | 2024-06-10 20:47:54 +0200 |
|---|---|---|
| committer | Tianhao Wang <shrik3@mailbox.org> | 2024-06-11 15:17:14 +0200 |
| commit | 13e3eca8ac3f6bd8c7a8fddde8b1937757e358ee (patch) | |
| tree | eb2d4992d5692287c232ac729ad18f9690eaa153 /src/arch | |
| parent | 8aaad696463004a9e51d35e4c466c131b3402822 (diff) | |
proc: basic task/stack creation
Now we can do a simple context swap (without scheduler though)
Diffstat (limited to 'src/arch')
| -rw-r--r-- | src/arch/x86_64/arch_regs.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/arch/x86_64/arch_regs.rs b/src/arch/x86_64/arch_regs.rs index a49926e..6bdccb0 100644 --- a/src/arch/x86_64/arch_regs.rs +++ b/src/arch/x86_64/arch_regs.rs @@ -15,6 +15,21 @@ pub struct Context64 { pub fpu: [u8; 108], } +impl Default for Context64 { + fn default() -> Context64 { + Context64 { + rbx: 0, + r12: 0, + r13: 0, + r14: 0, + r15: 0, + rbp: 0, + rsp: 0, + fpu: [0; 108], + } + } +} + /// arch specific registers #[repr(C)] #[repr(packed)] |
