Implement many process syscalls.

This commit is contained in:
Yifan Wu 2020-12-10 11:57:26 +08:00
parent e56ea17566
commit 8fbadfc951
20 changed files with 383 additions and 88 deletions

View file

@ -20,7 +20,9 @@ impl TrapContext {
trap_handler: usize,
) -> Self {
let mut sstatus = sstatus::read();
// set CPU privilege to User after trapping back
sstatus.set_spp(SPP::User);
// enable Supervisor mode interrupt after trapping back
sstatus.set_spie(true);
let mut cx = Self {
x: [0; 32],