Move CPU context implementations to a specific module

This commit is contained in:
Zhang Junyang
2025-03-05 15:17:32 +08:00
committed by Tate, Hongliang Tian
parent fc67adb1f0
commit f1c7564184
24 changed files with 49 additions and 38 deletions

View File

@ -3,7 +3,7 @@
//! Read the Cpu ctx content then dispatch syscall to corresponding handler
//! The each sub module contains functions that handle real syscall logic.
pub use clock_gettime::ClockId;
use ostd::cpu::UserContext;
use ostd::cpu::context::UserContext;
use crate::{context::Context, cpu::LinuxAbi, prelude::*};
@ -281,7 +281,7 @@ macro_rules! impl_syscall_nums_and_dispatch_fn {
syscall_number: u64,
args: [u64; 6],
ctx: &crate::context::Context,
user_ctx: &mut ostd::cpu::UserContext,
user_ctx: &mut ostd::cpu::context::UserContext,
) -> $crate::prelude::Result<$crate::syscall::SyscallReturn> {
match syscall_number {
$(