diff options
| author | ArdaFu <[email protected]> | 2016-08-09 11:29:11 +0800 |
|---|---|---|
| committer | ArdaFu <[email protected]> | 2016-08-09 11:29:11 +0800 |
| commit | 189e9b9632abca70c3a78403a9ad737dfd471da8 (patch) | |
| tree | ba0b9c77564ff7a7f4adb3712a925461fe1a7048 /include/rtthread.h | |
| parent | a0d264ba7245fb9ddbd2bf45652286655499066c (diff) | |
[Kernel] add new hooks for support trace componment.
Diffstat (limited to 'include/rtthread.h')
| -rw-r--r-- | include/rtthread.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/rtthread.h b/include/rtthread.h index c7f35d163e..6ab1ed9069 100644 --- a/include/rtthread.h +++ b/include/rtthread.h @@ -26,6 +26,7 @@ * 2007-03-03 Bernard clean up the definitions to rtdef.h * 2010-04-11 yi.qiu add module feature * 2013-06-24 Bernard add rt_kprintf re-define when not use RT_USING_CONSOLE. + * 2016-08-09 ArdaFu add new thread and interrupt hook. */ #ifndef __RT_THREAD_H__ @@ -153,6 +154,11 @@ rt_err_t rt_thread_suspend(rt_thread_t thread); rt_err_t rt_thread_resume(rt_thread_t thread); void rt_thread_timeout(void *parameter); +#ifdef RT_USING_HOOK +void rt_thread_suspend_sethook(void (*hook)(rt_thread_t thread)); +void rt_thread_resume_sethook(void (*hook)(rt_thread_t thread)); +#endif + /* * idle thread interface */ @@ -161,6 +167,7 @@ void rt_thread_idle_init(void); void rt_thread_idle_sethook(void (*hook)(void)); #endif void rt_thread_idle_excute(void); +rt_thread_t rt_thread_idle_gethandler(void); /* * schedule service @@ -460,6 +467,11 @@ void rt_interrupt_leave(void); */ rt_uint8_t rt_interrupt_get_nest(void); +#ifdef RT_USING_HOOK +void rt_interrupt_enter_sethook(void (*hook)(void)); +void rt_interrupt_leave_sethook(void (*hook)(void)); +#endif + #ifdef RT_USING_COMPONENTS_INIT void rt_components_init(void); void rt_components_board_init(void); |
