summaryrefslogtreecommitdiff
path: root/src/thread.c
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2021-07-07 20:24:19 +0800
committerGitHub <[email protected]>2021-07-07 20:24:19 +0800
commita28fd885b0283c8471945326303b9b89c9ef17cb (patch)
tree5eef35939b664cebfcd987828d2e58d53a625273 /src/thread.c
parent7c00795c71e07cb07d9c1dd9f8a7e08c9e09eb3f (diff)
parent0015af02e4f08ab47f2d2fefcb7c1aca1682bfda (diff)
Merge pull request #4846 from fenghuijie/master
修改irq handle接口rt_hw_trap_irq,支持核间IPI中断处理
Diffstat (limited to 'src/thread.c')
-rw-r--r--src/thread.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/thread.c b/src/thread.c
index 88cc7b61ba..60e6ab91d1 100644
--- a/src/thread.c
+++ b/src/thread.c
@@ -228,6 +228,10 @@ static rt_err_t _rt_thread_init(struct rt_thread *thread,
thread->lwp = RT_NULL;
#endif /* RT_USING_LWP */
+#ifdef RT_USING_CPU_USAGE
+ thread->duration_tick = 0;
+#endif
+
RT_OBJECT_HOOK_CALL(rt_thread_inited_hook, (thread));
return RT_EOK;