[libcpu][risc-v] fix rt_thread_switch_interrupt_flag issue.

This commit is contained in:
Bernard Xiong 2018-12-15 11:47:59 +08:00 committed by GitHub
parent fd347fdb90
commit 885d99ee9b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -69,10 +69,10 @@ IRQ_Handler:
/* need to switch new thread */ /* need to switch new thread */
la s0, rt_thread_switch_interrupt_flag la s0, rt_thread_switch_interrupt_flag
LOAD s2, 0(s0) lw s2, 0(s0)
beqz s2, spurious_interrupt beqz s2, spurious_interrupt
/* clear switch interrupt flag */ /* clear switch interrupt flag */
STORE zero, 0(s0) sw zero, 0(s0)
csrr a0, mepc csrr a0, mepc
STORE a0, 0 * REGBYTES(sp) STORE a0, 0 * REGBYTES(sp)