1
0
mirror of https://github.com/rcore-os/rCore.git synced 2024-11-22 16:16:16 +04:00

Fix sys_sendfile args

This commit is contained in:
Jiajie Chen 2019-04-19 12:34:27 +08:00
parent 7ce2fca209
commit 8494bf9b0c
3 changed files with 94 additions and 49 deletions

View File

@ -17,14 +17,11 @@ pub fn init() {
static mut CPUS: [Option<Cpu>; MAX_CPU_NUM] = [
// TODO: More elegant ?
None, None, None, None, None, None, None, None,
None, None, None, None, None, None, None, None,
None, None, None, None, None, None, None, None,
None, None, None, None, None, None, None, None,
None, None, None, None, None, None, None, None,
None, None, None, None, None, None, None, None,
None, None, None, None, None, None, None, None,
None, None, None, None, None, None, None, None,
None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None,
None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None,
None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None,
None, None, None, None, None, None, None, None, None, None, None, None, None, None, None,
None,
// None, None, None, None, None, None, None, None,
// None, None, None, None, None, None, None, None,
// None, None, None, None, None, None, None, None,

View File

@ -27,22 +27,70 @@ pub fn init() {
static PROCESSORS: [Processor; MAX_CPU_NUM] = [
// TODO: More elegant ?
Processor::new(), Processor::new(), Processor::new(), Processor::new(),
Processor::new(), Processor::new(), Processor::new(), Processor::new(),
Processor::new(), Processor::new(), Processor::new(), Processor::new(),
Processor::new(), Processor::new(), Processor::new(), Processor::new(),
Processor::new(), Processor::new(), Processor::new(), Processor::new(),
Processor::new(), Processor::new(), Processor::new(), Processor::new(),
Processor::new(), Processor::new(), Processor::new(), Processor::new(),
Processor::new(), Processor::new(), Processor::new(), Processor::new(),
Processor::new(), Processor::new(), Processor::new(), Processor::new(),
Processor::new(), Processor::new(), Processor::new(), Processor::new(),
Processor::new(), Processor::new(), Processor::new(), Processor::new(),
Processor::new(), Processor::new(), Processor::new(), Processor::new(),
Processor::new(), Processor::new(), Processor::new(), Processor::new(),
Processor::new(), Processor::new(), Processor::new(), Processor::new(),
Processor::new(), Processor::new(), Processor::new(), Processor::new(),
Processor::new(), Processor::new(), Processor::new(), Processor::new(),
Processor::new(),
Processor::new(),
Processor::new(),
Processor::new(),
Processor::new(),
Processor::new(),
Processor::new(),
Processor::new(),
Processor::new(),
Processor::new(),
Processor::new(),
Processor::new(),
Processor::new(),
Processor::new(),
Processor::new(),
Processor::new(),
Processor::new(),
Processor::new(),
Processor::new(),
Processor::new(),
Processor::new(),
Processor::new(),
Processor::new(),
Processor::new(),
Processor::new(),
Processor::new(),
Processor::new(),
Processor::new(),
Processor::new(),
Processor::new(),
Processor::new(),
Processor::new(),
Processor::new(),
Processor::new(),
Processor::new(),
Processor::new(),
Processor::new(),
Processor::new(),
Processor::new(),
Processor::new(),
Processor::new(),
Processor::new(),
Processor::new(),
Processor::new(),
Processor::new(),
Processor::new(),
Processor::new(),
Processor::new(),
Processor::new(),
Processor::new(),
Processor::new(),
Processor::new(),
Processor::new(),
Processor::new(),
Processor::new(),
Processor::new(),
Processor::new(),
Processor::new(),
Processor::new(),
Processor::new(),
Processor::new(),
Processor::new(),
Processor::new(),
Processor::new(),
// Processor::new(), Processor::new(), Processor::new(), Processor::new(),
// Processor::new(), Processor::new(), Processor::new(), Processor::new(),
// Processor::new(), Processor::new(), Processor::new(), Processor::new(),

View File

@ -88,7 +88,7 @@ pub fn syscall(id: usize, args: [usize; 6], tf: &mut TrapFrame) -> isize {
}
SYS_GETPID => sys_getpid(),
// 40
SYS_SENDFILE => sys_sendfile(args[0], args[1], args[3] as *mut usize, args[4]),
SYS_SENDFILE => sys_sendfile(args[0], args[1], args[2] as *mut usize, args[3]),
SYS_SOCKET => sys_socket(args[0], args[1], args[2]),
SYS_CONNECT => sys_connect(args[0], args[1] as *const SockAddr, args[2]),
SYS_ACCEPT => sys_accept(args[0], args[1] as *mut SockAddr, args[2] as *mut u32),