Lines Matching refs:regs

28 pub extern "C" fn sys_open(regs: &pt_regs) -> u64 {  in sys_open()
29 let path: &CStr = unsafe { CStr::from_ptr(regs.r8 as usize as *const c_char) }; in sys_open()
35 let flags = regs.r9; in sys_open()
50 pub extern "C" fn sys_close(regs: &pt_regs) -> u64 { in sys_close()
51 let fd = regs.r8 as i32; in sys_close()
67 pub extern "C" fn sys_read(regs: &pt_regs) -> u64 { in sys_read()
68 let fd = regs.r8 as i32; in sys_read()
69 let buf_vaddr = regs.r9 as usize; in sys_read()
70 let len = regs.r10 as usize; in sys_read()
73 if user_mode(regs) && unsafe { !verify_area(buf_vaddr as u64, len as u64) } { in sys_read()
96 pub extern "C" fn sys_write(regs: &pt_regs) -> u64 { in sys_write()
97 let fd = regs.r8 as i32; in sys_write()
98 let buf_vaddr = regs.r9 as usize; in sys_write()
99 let len = regs.r10 as usize; in sys_write()
102 if user_mode(regs) && unsafe { !verify_area(buf_vaddr as u64, len as u64) } { in sys_write()
125 pub extern "C" fn sys_lseek(regs: &pt_regs) -> u64 { in sys_lseek()
126 let fd = regs.r8 as i32; in sys_lseek()
127 let offset = regs.r9 as i64; in sys_lseek()
128 let whence = regs.r10 as u32; in sys_lseek()
169 pub extern "C" fn sys_chdir(regs: &pt_regs) -> u64 { in sys_chdir()
170 if regs.r8 == 0 { in sys_chdir()
173 let ptr = regs.r8 as usize as *const c_char; in sys_chdir()
176 || (user_mode(regs) && unsafe { !verify_area(ptr as u64, PAGE_2M_SIZE as u64) }) in sys_chdir()
225 pub extern "C" fn sys_getdents(regs: &pt_regs) -> u64 { in sys_getdents()
226 let fd = regs.r8 as i32; in sys_getdents()
227 let count = regs.r10 as i64; in sys_getdents()
228 let dirent = match unsafe { (regs.r9 as usize as *mut Dirent).as_mut() } { in sys_getdents()
264 pub extern "C" fn sys_mkdir(regs: &pt_regs) -> u64 { in sys_mkdir()
265 let ptr = regs.r8 as usize as *const c_char; in sys_mkdir()
267 || (user_mode(regs) && unsafe { !verify_area(ptr as u64, PAGE_2M_SIZE as u64) }) in sys_mkdir()
273 let mode = regs.r9; in sys_mkdir()
303 pub extern "C" fn sys_unlink_at(regs: &pt_regs) -> u64 { in sys_unlink_at()
304 let _dfd = regs.r8; in sys_unlink_at()
305 let ptr = regs.r9 as usize as *const c_char; in sys_unlink_at()
307 || (user_mode(regs) && unsafe { !verify_area(ptr as u64, PAGE_2M_SIZE as u64) }) in sys_unlink_at()
313 let flag = regs.r10; in sys_unlink_at()