Prefer Context::get_user_space than CurrentUserSpace::get

This commit is contained in:
Zhang Junyang
2024-08-11 14:42:17 +00:00
committed by Tate, Hongliang Tian
parent 8cf7063150
commit 38b46f7ac3
67 changed files with 178 additions and 132 deletions

View File

@ -27,7 +27,7 @@ pub fn sys_read(
let read_len = if buf_len != 0 {
let mut read_buf = vec![0u8; buf_len];
let read_len = file.read(&mut read_buf)?;
CurrentUserSpace::get().write_bytes(
ctx.get_user_space().write_bytes(
user_buf_addr,
&mut VmReader::from(&read_buf[..min(read_len, buf_len)]),
)?;