Drop files at the correct time

This commit is contained in:
Ruihan Li
2025-04-05 14:28:15 +08:00
committed by Tate, Hongliang Tian
parent 7e1abc1fbb
commit 8600278a5f
62 changed files with 223 additions and 141 deletions

View File

@ -23,7 +23,7 @@ pub fn sys_lseek(fd: FileDesc, offset: isize, whence: u32, ctx: &Context) -> Res
2 => SeekFrom::End(offset),
_ => return_errno!(Errno::EINVAL),
};
let mut file_table = ctx.thread_local.file_table().borrow_mut();
let mut file_table = ctx.thread_local.borrow_file_table_mut();
let file = get_file_fast!(&mut file_table, fd);
let offset = file.seek(seek_from)?;