Implement many process syscalls.
This commit is contained in:
parent
e56ea17566
commit
8fbadfc951
20 changed files with 383 additions and 88 deletions
|
@ -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],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue