Start stdin

This commit is contained in:
2026-03-13 11:15:52 +01:00
parent f67718c3fe
commit de6ef959ce
18 changed files with 347 additions and 72 deletions

View File

@@ -149,6 +149,16 @@ unsafe extern "C" fn supervisor_trap_handler(
let vnode = current_process.fd_table.get_mut(&fd).unwrap();
vnode.write(buf).unwrap();
}
SysCall::Read => {
let fd = a1;
let buf =
unsafe { core::slice::from_raw_parts_mut(a2 as *mut u8, a3 as usize) };
let mut scheduler = SCHEDULER.lock();
let current_process = scheduler.get_current_process();
let vnode = current_process.fd_table.get_mut(&fd).unwrap();
vnode.read(buf).unwrap();
}
SysCall::Seek => {
let fd = a1;
let seek = match a2 {