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

@ -1,6 +1,6 @@
// SPDX-License-Identifier: MPL-2.0
use ostd::cpu::UserContext;
use ostd::cpu::context::UserContext;
use super::SyscallReturn;
use crate::prelude::*;

View File

@ -2,7 +2,7 @@
use core::num::NonZeroU64;
use ostd::cpu::UserContext;
use ostd::cpu::context::UserContext;
use super::SyscallReturn;
use crate::{

View File

@ -2,7 +2,7 @@
use aster_rights::WriteOp;
use ostd::{
cpu::{FpuState, RawGeneralRegs, UserContext},
cpu::context::{FpuState, RawGeneralRegs, UserContext},
user::UserContextApi,
};

View File

@ -1,6 +1,6 @@
// SPDX-License-Identifier: MPL-2.0
use ostd::cpu::UserContext;
use ostd::cpu::context::UserContext;
use super::SyscallReturn;
use crate::{

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 {
$(

View File

@ -2,7 +2,7 @@
use core::sync::atomic::Ordering;
use ostd::{cpu::UserContext, user::UserContextApi};
use ostd::{cpu::context::UserContext, user::UserContextApi};
use super::SyscallReturn;
use crate::{prelude::*, process::signal::c_types::ucontext_t};