xref: /DragonOS/kernel/src/arch/riscv64/sched.rs (revision c635d8a9cfe25bc11779f323ef0c7d7a0f597d4a)
1 use crate::{
2     driver::clocksource::timer_riscv::riscv_sbi_timer_init_local, exception::InterruptArch,
3     sched::SchedArch,
4 };
5 
6 use super::CurrentIrqArch;
7 
8 /// 发起调度
9 #[no_mangle]
10 pub extern "C" fn sched() {
11     unimplemented!("RiscV64::sched")
12 }
13 
14 pub struct RiscV64SchedArch;
15 
16 impl SchedArch for RiscV64SchedArch {
17     fn enable_sched_local() {
18         riscv_sbi_timer_init_local();
19         unsafe { CurrentIrqArch::interrupt_enable() };
20     }
21 
22     fn disable_sched_local() {
23         todo!()
24     }
25 
26     fn initial_setup_sched_local() {}
27 }
28