Return (bottom, top) of a kernel stack in kernel space.
(kstack_id: usize)
| 62 | |
| 63 | /// Return (bottom, top) of a kernel stack in kernel space. |
| 64 | pub fn kernel_stack_position(kstack_id: usize) -> (usize, usize) { |
| 65 | let top = TRAMPOLINE - kstack_id * (KERNEL_STACK_SIZE + PAGE_SIZE); |
| 66 | let bottom = top - KERNEL_STACK_SIZE; |
| 67 | (bottom, top) |
| 68 | } |
| 69 | |
| 70 | pub struct KernelStack(pub usize); |
| 71 |
no outgoing calls
no test coverage detected