mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-19 20:46:35 +00:00
Move FS things to PosixThread
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
fe7e4884c9
commit
36fc1d3757
@ -61,7 +61,7 @@ fn do_sys_pwritev(
|
||||
return_errno_with_message!(Errno::EINVAL, "offset cannot be negative");
|
||||
}
|
||||
let file = {
|
||||
let filetable = ctx.process.file_table().lock();
|
||||
let filetable = ctx.posix_thread.file_table().lock();
|
||||
filetable.get_file(fd)?.clone()
|
||||
};
|
||||
// TODO: Check (f.file->f_mode & FMODE_PREAD); We don't have f_mode in our FileLike trait
|
||||
@ -117,7 +117,7 @@ fn do_sys_writev(
|
||||
fd, io_vec_ptr, io_vec_count
|
||||
);
|
||||
let file = {
|
||||
let filetable = ctx.process.file_table().lock();
|
||||
let filetable = ctx.posix_thread.file_table().lock();
|
||||
filetable.get_file(fd)?.clone()
|
||||
};
|
||||
let mut total_len = 0;
|
||||
|
Reference in New Issue
Block a user