mirror of
https://github.com/rcore-os/rCore.git
synced 2024-11-22 08:06:17 +04:00
Fix sys_sendfile args
This commit is contained in:
parent
7ce2fca209
commit
8494bf9b0c
@ -17,22 +17,19 @@ 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, 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,
|
||||
];
|
||||
|
||||
pub struct Cpu {
|
||||
|
@ -27,38 +27,86 @@ 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(),
|
||||
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(),
|
||||
];
|
||||
|
||||
/// Get current process
|
||||
|
@ -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),
|
||||
|
Loading…
Reference in New Issue
Block a user