summaryrefslogtreecommitdiff
path: root/include/rtdef.h
diff options
context:
space:
mode:
authorfenghuijie <[email protected]>2021-07-05 18:33:22 +0800
committerfenghuijie <[email protected]>2021-07-05 18:33:22 +0800
commit0015af02e4f08ab47f2d2fefcb7c1aca1682bfda (patch)
treefded7632c1ea03699173ce94ba627544669786f1 /include/rtdef.h
parente933c1f6105caf4e68bd57bc5521767b32063a5f (diff)
调整代码,以支持cpu usage
Diffstat (limited to 'include/rtdef.h')
-rw-r--r--include/rtdef.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/rtdef.h b/include/rtdef.h
index 2eb2cc1963..e1a64a433a 100644
--- a/include/rtdef.h
+++ b/include/rtdef.h
@@ -663,6 +663,10 @@ struct rt_thread
rt_ubase_t init_tick; /**< thread's initialized tick */
rt_ubase_t remaining_tick; /**< remaining tick */
+#ifdef RT_USING_CPU_USAGE
+ rt_uint64_t duration_tick; /**< cpu usage tick */
+#endif
+
struct rt_timer thread_timer; /**< built-in thread timer */
void (*cleanup)(struct rt_thread *tid); /**< cleanup function when thread exit */