(&self)
| 163 | } |
| 164 | |
| 165 | fn dealloc_user_res(&self) { |
| 166 | // dealloc tid |
| 167 | let process = self.process.upgrade().unwrap(); |
| 168 | let mut process_inner = process.inner_exclusive_access(); |
| 169 | // dealloc ustack manually |
| 170 | let ustack_bottom_va: VirtAddr = ustack_bottom_from_tid(self.ustack_base, self.tid).into(); |
| 171 | process_inner |
| 172 | .memory_set |
| 173 | .remove_area_with_start_vpn(ustack_bottom_va.into()); |
| 174 | // dealloc trap_cx manually |
| 175 | let trap_cx_bottom_va: VirtAddr = trap_cx_bottom_from_tid(self.tid).into(); |
| 176 | process_inner |
| 177 | .memory_set |
| 178 | .remove_area_with_start_vpn(trap_cx_bottom_va.into()); |
| 179 | } |
| 180 | |
| 181 | #[allow(unused)] |
| 182 | pub fn alloc_tid(&mut self) { |
no test coverage detected