diff options
| author | Bernard Xiong <[email protected]> | 2021-07-07 20:24:19 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-07-07 20:24:19 +0800 |
| commit | a28fd885b0283c8471945326303b9b89c9ef17cb (patch) | |
| tree | 5eef35939b664cebfcd987828d2e58d53a625273 /include | |
| parent | 7c00795c71e07cb07d9c1dd9f8a7e08c9e09eb3f (diff) | |
| parent | 0015af02e4f08ab47f2d2fefcb7c1aca1682bfda (diff) | |
Merge pull request #4846 from fenghuijie/master
修改irq handle接口rt_hw_trap_irq,支持核间IPI中断处理
Diffstat (limited to 'include')
| -rw-r--r-- | include/rtdef.h | 8 | ||||
| -rw-r--r-- | include/rtthread.h | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/include/rtdef.h b/include/rtdef.h index d125c970c9..e1a64a433a 100644 --- a/include/rtdef.h +++ b/include/rtdef.h @@ -567,6 +567,10 @@ typedef siginfo_t rt_siginfo_t; #define RT_SCHEDULE_IPI 0 #endif +#ifndef RT_STOP_IPI +#define RT_STOP_IPI 1 +#endif + /** * CPUs definitions * @@ -659,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 */ diff --git a/include/rtthread.h b/include/rtthread.h index f2f4091b8a..cf47a48efe 100644 --- a/include/rtthread.h +++ b/include/rtthread.h @@ -186,6 +186,7 @@ rt_uint16_t rt_critical_level(void); #ifdef RT_USING_HOOK void rt_scheduler_sethook(void (*hook)(rt_thread_t from, rt_thread_t to)); +void rt_scheduler_switch_sethook(void (*hook)(struct rt_thread *tid)); #endif #ifdef RT_USING_SMP |
