23#define DBG_TAG "kernel.irq"
24#define DBG_LVL DBG_INFO
27#if defined(RT_USING_HOOK) && defined(RT_HOOK_USING_FUNC_PTR)
29static void (*rt_interrupt_enter_hook)(void);
30static void (*rt_interrupt_leave_hook)(void);
43 rt_interrupt_enter_hook = hook;
57 rt_interrupt_leave_hook = hook;
68#define rt_interrupt_nest rt_cpu_self()->irq_nest
73#ifdef ARCH_USING_IRQ_CTX_LIST
104 LOG_D(
"irq has come..., irq current nest:%d",
119 LOG_D(
"irq is going to leave, irq current nest:%d",
struct rt_cpu * rt_cpu_self(void)
This fucntion will return current cpu object.
rt_weak void rt_interrupt_enter(void)
This function will be invoked by BSP, when enter interrupt service routine
rt_weak rt_bool_t rt_hw_interrupt_is_disabled(void)
rt_weak rt_uint8_t rt_interrupt_get_nest(void)
This function will return the nest of interrupt.
volatile rt_atomic_t rt_interrupt_nest
rt_weak void rt_interrupt_leave(void)
This function will be invoked by BSP, when leave interrupt service routine
#define RT_OBJECT_HOOK_CALL(func, argv)
rt_inline void rt_slist_insert(rt_slist_t *l, rt_slist_t *n)
#define rt_slist_first_entry(ptr, type, member)
rt_inline rt_slist_t * rt_slist_pop(rt_slist_t *l)
struct rt_interrupt_context * rt_interrupt_context_t
#define rt_atomic_sub(ptr, v)
#define rt_atomic_add(ptr, v)
#define rt_atomic_load(ptr)
void rt_hw_interrupt_enable(rt_base_t level)
#define rt_hw_local_irq_disable
rt_base_t rt_hw_interrupt_disable(void)
#define rt_hw_local_irq_enable
#define RTM_EXPORT(symbol)
void rt_interrupt_context_push(rt_interrupt_context_t this_ctx)
void rt_interrupt_enter_sethook(void(*hook)(void))
void rt_interrupt_leave_sethook(void(*hook)(void))
void rt_interrupt_context_pop(void)
void * rt_interrupt_context_get(void)