diff options
| author | Gabriel Wang <[email protected]> | 2022-01-07 23:35:44 +0000 |
|---|---|---|
| committer | Gabriel Wang <[email protected]> | 2022-01-07 23:35:44 +0000 |
| commit | d7b8cf81e6285f3cbb0817cbe79c527f10ff56b7 (patch) | |
| tree | 3e47ead2e339c0f1181c9ca2f4ffbfec9536d7eb /src/irq.c | |
| parent | 495e209f379338b2bbc4ba086e457d0fb6d22a8d (diff) | |
move some __on_rt_xxxxx_hook from rtdef.h to dedicated c soure files
Diffstat (limited to 'src/irq.c')
| -rw-r--r-- | src/irq.c | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -10,12 +10,20 @@ * 2016-08-09 ArdaFu add interrupt enter and leave hook. * 2018-11-22 Jesven rt_interrupt_get_nest function add disable irq * 2021-08-15 Supperthomas fix the comment + * 2022-01-07 Gabriel Moving __on_rt_xxxxx_hook to irq.c */ #include <rthw.h> #include <rtthread.h> -#ifdef RT_USING_HOOK +#ifndef __on_rt_interrupt_enter_hook + #define __on_rt_interrupt_enter_hook() __ON_HOOK_ARGS(rt_interrupt_enter_hook, ()) +#endif +#ifndef __on_rt_interrupt_leave_hook + #define __on_rt_interrupt_leave_hook() __ON_HOOK_ARGS(rt_interrupt_leave_hook, ()) +#endif + +#if defined(RT_USING_HOOK) && defined(RT_HOOK_USING_FUNC_PTR) static void (*rt_interrupt_enter_hook)(void); static void (*rt_interrupt_leave_hook)(void); |
