Fix k210 alignment issue when push cmdargs when sys_exec

This commit is contained in:
Yifan Wu 2021-02-28 08:51:31 +08:00
parent e55c5200c5
commit a43dbc4e34

View File

@ -142,6 +142,8 @@ impl TaskControlBlock {
}
*translated_refmut(memory_set.token(), p as *mut u8) = 0;
}
// make the user_sp aligned to 8B for k210 platform
user_sp -= user_sp % core::mem::size_of::<usize>();
// **** hold current PCB lock
let mut inner = self.acquire_inner_lock();