Skip to content

Commit

Permalink
mark region as unsafe
Browse files Browse the repository at this point in the history
  • Loading branch information
stlankes committed Apr 26, 2020
1 parent 139cf93 commit 07650d9
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/arch/x86_64/kernel/scheduler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,14 @@ impl TaskStacks {
);

// clear user stack
ptr::write_bytes(
(virt_addr + KERNEL_STACK_SIZE + DEFAULT_STACK_SIZE + 3 * BasePageSize::SIZE)
as *mut u8,
0,
user_stack_size,
);
unsafe {
ptr::write_bytes(
(virt_addr + KERNEL_STACK_SIZE + DEFAULT_STACK_SIZE + 3 * BasePageSize::SIZE)
as *mut u8,
0,
user_stack_size,
);
}

TaskStacks::Common(CommonStack {
virt_addr: virt_addr,
Expand Down

0 comments on commit 07650d9

Please sign in to comment.