mirror of
https://gitee.com/Vancouver2017/luban-lite.git
synced 2025-12-16 17:18:56 +00:00
v1.0.3
This commit is contained in:
@@ -31,6 +31,16 @@ vPortYield:
|
||||
or t1, t1, t2
|
||||
sb t1, (t0)
|
||||
|
||||
/* make sure wite instruction is complete */
|
||||
fence
|
||||
lw t1, (t0)
|
||||
fence
|
||||
#ifdef __riscv_xthead
|
||||
sync.is
|
||||
#else
|
||||
.long 0x01b0000b
|
||||
#endif
|
||||
|
||||
ret
|
||||
|
||||
/*
|
||||
@@ -67,7 +77,11 @@ rt_hw_context_switch_to:
|
||||
fence
|
||||
lw t1, (t0)
|
||||
fence
|
||||
#ifdef __riscv_xthead
|
||||
sync.is
|
||||
#else
|
||||
.long 0x01b0000b
|
||||
#endif
|
||||
|
||||
/* enable global interrup */
|
||||
csrsi mstatus, 8
|
||||
@@ -120,7 +134,11 @@ rt_hw_context_switch_interrupt:
|
||||
fence
|
||||
lw t1, (t0)
|
||||
fence
|
||||
#ifdef __riscv_xthead
|
||||
sync.is
|
||||
#else
|
||||
.long 0x01b0000b
|
||||
#endif
|
||||
|
||||
LOAD t0, 0 * REGBYTES(sp)
|
||||
LOAD t1, 1 * REGBYTES(sp)
|
||||
|
||||
@@ -31,6 +31,16 @@ vPortYield:
|
||||
or t1, t1, t2
|
||||
sb t1, (t0)
|
||||
|
||||
/* make sure wite instruction is complete */
|
||||
fence
|
||||
lb t1, (t0)
|
||||
fence
|
||||
#ifdef __riscv_xthead
|
||||
sync.i
|
||||
#else
|
||||
.long 0x01a0000b
|
||||
#endif
|
||||
|
||||
ret
|
||||
|
||||
/*
|
||||
@@ -75,7 +85,11 @@ rt_hw_context_switch_to:
|
||||
fence
|
||||
lb t1, (t0)
|
||||
fence
|
||||
#ifdef __riscv_xthead
|
||||
sync.i
|
||||
#else
|
||||
.long 0x01a0000b
|
||||
#endif
|
||||
|
||||
/* enable global interrup */
|
||||
csrsi mstatus, 8
|
||||
@@ -130,7 +144,11 @@ rt_hw_context_switch_interrupt:
|
||||
fence
|
||||
lb t1, (t0)
|
||||
fence
|
||||
#ifdef __riscv_xthead
|
||||
sync.i
|
||||
#else
|
||||
.long 0x01a0000b
|
||||
#endif
|
||||
|
||||
LOAD t0, 0 * REGBYTES(sp)
|
||||
LOAD t1, 1 * REGBYTES(sp)
|
||||
|
||||
Reference in New Issue
Block a user