diff --git a/src/irq.c b/src/irq.c index 491f97f4a8..de36868d87 100644 --- a/src/irq.c +++ b/src/irq.c @@ -35,14 +35,14 @@ volatile rt_uint8_t rt_interrupt_nest; */ void rt_interrupt_enter(void) { - rt_base_t level; + rt_base_t level; - RT_DEBUG_LOG(RT_DEBUG_IRQ, ("irq coming..., irq nest:%d\n", + RT_DEBUG_LOG(RT_DEBUG_IRQ, ("irq coming..., irq nest:%d\n", rt_interrupt_nest)); - level = rt_hw_interrupt_disable(); - rt_interrupt_nest ++; - rt_hw_interrupt_enable(level); + level = rt_hw_interrupt_disable(); + rt_interrupt_nest ++; + rt_hw_interrupt_enable(level); } RTM_EXPORT(rt_interrupt_enter); @@ -55,13 +55,14 @@ RTM_EXPORT(rt_interrupt_enter); */ void rt_interrupt_leave(void) { - rt_base_t level; + rt_base_t level; - RT_DEBUG_LOG(RT_DEBUG_IRQ, ("irq leave, irq nest:%d\n", rt_interrupt_nest)); + RT_DEBUG_LOG(RT_DEBUG_IRQ, ("irq leave, irq nest:%d\n", + rt_interrupt_nest)); - level = rt_hw_interrupt_disable(); - rt_interrupt_nest --; - rt_hw_interrupt_enable(level); + level = rt_hw_interrupt_disable(); + rt_interrupt_nest --; + rt_hw_interrupt_enable(level); } RTM_EXPORT(rt_interrupt_leave); @@ -75,7 +76,7 @@ RTM_EXPORT(rt_interrupt_leave); */ rt_uint8_t rt_interrupt_get_nest(void) { - return rt_interrupt_nest; + return rt_interrupt_nest; } RTM_EXPORT(rt_interrupt_get_nest);