@@ -20,7 +20,7 @@ extern "Rust" {
2020///
2121/// # Note
2222///
23- /// This function does **NOT** modify the [`riscv::register::mstatus`] register.
23+ /// This function does **NOT** modify the [`mstatus`](` riscv::register::mstatus`) register.
2424/// If you want to disable **ANY** other interrupt source, you must **ALSO** use the [`disable`] function.
2525#[ inline]
2626pub fn clear_interrupts ( ) {
@@ -38,7 +38,7 @@ pub fn clear_interrupts() {
3838///
3939/// # Note
4040///
41- /// This function does not modify the [`riscv::register::mstatus`] register.
41+ /// This function does not modify the [`mstatus`](` riscv::register::mstatus`) register.
4242/// If you want to enable **ANY** other interrupt source, you must **ALSO** use the [`enable`] function.
4343///
4444/// # Safety
@@ -62,9 +62,7 @@ pub fn get_threshold() -> u8 {
6262///
6363/// # Safety
6464///
65- /// Setting the priority threshold to a value lower than the current threshold
66- /// may lead to priority inversion. If you want to make sure that the threshold
67- /// is only raised, use the [`raise_threshold`] function instead.
65+ /// Setting the priority threshold to a value lower than the current may lead to priority inversion.
6866#[ inline]
6967pub unsafe fn set_threshold ( priority : u8 ) {
7068 __riscv_slic_set_threshold ( priority) ;
@@ -81,20 +79,6 @@ pub unsafe fn set_priority<I: crate::InterruptNumber>(interrupt: I, priority: u8
8179}
8280
8381/// Stabilized API for pending a software interrupt on the SLIC.
84- ///
85- /// # Note
86- ///
87- /// When working with the `mecall-backend` feature, special care must be taken
88- /// when using this function **inside** an interrupt handler. This is because
89- /// this backend uses the `ecall` instruction to trigger software interrupts.
90- /// If you call this function inside an interrupt handler, the `mepc` register
91- /// will be incremented by 4, leading to unexpected behavior.
92- /// To avoid this, make sure that:
93- ///
94- /// - You only call this function **outside** of interrupt handlers.
95- /// - If you need to trigger a software interrupt inside an interrupt handler,
96- /// do it inside a [`nested`] block. This will ensure that the
97- /// `mepc` register is not incremented incorrectly.
9882#[ inline]
9983pub fn pend < I : crate :: InterruptNumber > ( interrupt : I ) {
10084 // SAFETY: it is safe to pend a software interrupt
0 commit comments