xref: /DragonOS/kernel/src/arch/riscv64/sched.rs (revision 01c18c64b14b4ebabd98fa92c587c26874275eb1)
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