Extract shared code from timer

This commit is contained in:
YanWQ-monad
2024-09-24 21:01:34 +08:00
committed by Tate, Hongliang Tian
parent c4cb0f1aef
commit 839c2a6689
12 changed files with 47 additions and 38 deletions

View File

@ -4,7 +4,7 @@ use alloc::sync::Arc;
use core::time::Duration;
use log::trace;
use ostd::arch::timer::Jiffies;
use ostd::timer::Jiffies;
use super::{ext::IfaceEx, Iface, IFACES};
use crate::{

View File

@ -9,11 +9,9 @@ use core::time::Duration;
use id_alloc::IdAlloc;
use ostd::{
arch::{
timer::{self, TIMER_FREQ},
trap::is_kernel_interrupted,
},
arch::{timer::TIMER_FREQ, trap::is_kernel_interrupted},
sync::Mutex,
timer,
};
use super::Process;

View File

@ -5,11 +5,11 @@ use core::time::Duration;
use aster_time::read_monotonic_time;
use ostd::{
arch::timer::Jiffies,
cpu::{num_cpus, PinCurrentCpu},
cpu_local,
sync::SpinLock,
task::disable_preempt,
timer::Jiffies,
};
use paste::paste;
use spin::Once;

View File

@ -2,7 +2,7 @@
use alloc::{boxed::Box, vec::Vec};
use ostd::{arch::timer, sync::RwLock, trap::SoftIrqLine};
use ostd::{sync::RwLock, timer, trap::SoftIrqLine};
use crate::softirq_id::TIMER_SOFTIRQ_ID;