os/arch/riscv/intr/softirq.rs
1//! RISC-V 架构的中断管理
2#![allow(unused)]
3
4use crate::sync::SpinLock;
5
6/// 软中断枚举
7pub enum Softirq {
8 HiSoftirq,
9 TimerSoftirq,
10 NetTxSoftirq,
11 NetRxSoftirq,
12 BlockSoftirq,
13 IrqPollSoftirq,
14 TaskletSoftirq,
15 SchedSoftirq,
16 HrtimerSoftirq,
17 RcuSoftirq, /* Preferable RCU should always be the last softirq */
18 NrSoftirqs,
19}
20
21/// 触发软中断
22/// 参数:
23/// * `softirq` - 要触发的软中断类型
24/// 安全性: 该函数涉及底层中断处理机制,可能会引发竞态条件或系统不稳定。
25/// 调用者必须确保在适当的上下文中调用此函数,以避免潜在的问题。
26#[unsafe(no_mangle)]
27pub fn raise_softirq(softirq: Softirq) {
28 unimplemented!("raise_softirq is not implemented yet");
29}