summaryrefslogtreecommitdiff
path: root/libcpu
diff options
context:
space:
mode:
authorHuaqi Fang <[email protected]>2021-10-15 15:20:00 +0800
committerHuaqi Fang <[email protected]>2021-10-15 15:20:00 +0800
commit45f9e9c4cbba04c688d2fdb6731eb15088bf96a0 (patch)
treea8435b5c932ac35b9edf5d7dec9f8dc62c1f5e29 /libcpu
parentcda8caeda0cf105dd660192e367017eea0d407ec (diff)
[libcpu][nuclei] Fix context switch in nuclei
previous rt_hw_context_switch might cause the task switch handling error. See https://github.com/Nuclei-Software/nuclei-sdk/commit/1a1a209e9363840d372c04b84ce733ea6b6e79f2#diff-ba922e02206af6c52163f0c34a7e76e427b7ea22f791329b62f2069241c57778 Signed-off-by: Huaqi Fang <[email protected]>
Diffstat (limited to 'libcpu')
-rw-r--r--libcpu/risc-v/nuclei/cpuport.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/libcpu/risc-v/nuclei/cpuport.c b/libcpu/risc-v/nuclei/cpuport.c
index e74d174a54..a107799937 100644
--- a/libcpu/risc-v/nuclei/cpuport.c
+++ b/libcpu/risc-v/nuclei/cpuport.c
@@ -143,9 +143,7 @@ void rt_hw_context_switch_interrupt(rt_ubase_t from, rt_ubase_t to)
*/
void rt_hw_context_switch(rt_ubase_t from, rt_ubase_t to)
{
- rt_interrupt_from_thread = from;
- rt_interrupt_to_thread = to;
- RT_YIELD();
+ rt_hw_context_switch_interrupt(from, to);
}
/**