Support cmdline_args when sys_exec.

This commit is contained in:
Yifan Wu 2021-02-26 12:06:55 +08:00
parent c43ec12175
commit c8d851fc2b
16 changed files with 132 additions and 24 deletions

View file

@ -115,6 +115,11 @@ impl VirtPageNum {
}
impl PhysAddr {
pub fn get_ref<T>(&self) -> &'static T {
unsafe {
(self.0 as *const T).as_ref().unwrap()
}
}
pub fn get_mut<T>(&self) -> &'static mut T {
unsafe {
(self.0 as *mut T).as_mut().unwrap()