summaryrefslogtreecommitdiff
path: root/src/clock.c
diff options
context:
space:
mode:
authorshaojinchun <[email protected]>2019-10-11 09:13:40 +0800
committershaojinchun <[email protected]>2019-10-12 10:51:47 +0800
commit234af6aaa2ec2fd5c8c758a8f9fa29553ddeaf3f (patch)
tree83e0c2fb86cb203117d537e613bab627efb72c91 /src/clock.c
parent413fcba30a532e416d930e6209c331d05e2d2887 (diff)
修正相同优先级任务切换太频繁的问题
Diffstat (limited to 'src/clock.c')
-rw-r--r--src/clock.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/clock.c b/src/clock.c
index a652282b6e..d56f4b00f3 100644
--- a/src/clock.c
+++ b/src/clock.c
@@ -89,6 +89,8 @@ void rt_tick_increase(void)
/* change to initialized tick */
thread->remaining_tick = thread->init_tick;
+ thread->can_yield = 1;
+
/* yield */
rt_thread_yield();
}