diff options
| author | MuChenger <[email protected]> | 2026-02-25 11:22:17 +0800 |
|---|---|---|
| committer | Rbb666 <[email protected]> | 2026-02-25 14:54:20 +0800 |
| commit | f610f18a3c796ba1bc404c886b408b01ca814cef (patch) | |
| tree | 2444f8c70788c49fbb345552aed98bd6bbfb0857 /libcpu | |
| parent | 4a090fbd5b9bbdf8b0611735f1c6823d041a60b8 (diff) | |
[bsp/gd32] fix gd32vw553 bsp
Diffstat (limited to 'libcpu')
| -rw-r--r-- | libcpu/risc-v/common/interrupt_gcc.S | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/libcpu/risc-v/common/interrupt_gcc.S b/libcpu/risc-v/common/interrupt_gcc.S index 6eb0ef371f..dad8cac424 100644 --- a/libcpu/risc-v/common/interrupt_gcc.S +++ b/libcpu/risc-v/common/interrupt_gcc.S @@ -102,12 +102,18 @@ SW_handler: /* interrupt handle */ call rt_interrupt_enter /* Do the work after saving the above */ - jal rt_hw_do_after_save_above + call rt_hw_do_after_save_above call rt_interrupt_leave /* switch to from thread stack */ csrrw sp,mscratch,sp + /* Check if we are in interrupt nesting, if so, skip task switching */ + la t0, rt_interrupt_nest + lw t1, 0(t0) + li t2, 1 + bge t1, t2, 1f + /* Determine whether to trigger scheduling at the interrupt function */ la t0, rt_thread_switch_interrupt_flag lw t2, 0(t0) |
