MCPcopy Create free account
hub / github.com/chyyuu/os_kernel_lab / zero_init

Method zero_init

os/src/task/context.rs:11–17  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

9
10impl TaskContext {
11 pub fn zero_init() -> Self {
12 Self {
13 ra: 0,
14 sp: 0,
15 s: [0; 12],
16 }
17 }
18 pub fn goto_trap_return(kstack_ptr: usize) -> Self {
19 Self {
20 ra: trap_return as usize,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected