RISC中关中断应该用原子操作,避免多任务环境造成错误
This commit is contained in:
@@ -132,7 +132,9 @@ os_port_context_restore:
|
||||
lw a0, 0 * 4(sp)
|
||||
csrw mepc, a0
|
||||
|
||||
lw a0, 2*4(sp) /* 恢复 MPIE */
|
||||
li t0, 0x1800
|
||||
csrs mstatus, t0
|
||||
lw a0, 2*4(sp)
|
||||
csrs mstatus, a0
|
||||
|
||||
lw x1, 1 * 4(sp) /* 返回地址 */
|
||||
|
||||
Reference in New Issue
Block a user