Fetching buffer arguments from user space.

This commit is contained in:
Yifan Wu 2020-12-06 13:56:13 +08:00
parent d38b24a9cb
commit 9366099b28
20 changed files with 405 additions and 82 deletions

View file

@ -10,6 +10,7 @@ use fs::*;
use process::*;
pub fn syscall(syscall_id: usize, args: [usize; 3]) -> isize {
println!("into syscall!");
match syscall_id {
SYSCALL_WRITE => sys_write(args[0], args[1] as *const u8, args[2]),
SYSCALL_EXIT => sys_exit(args[0] as i32),