fixed the coding style in irq.c

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2504 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
dzzxzz@gmail.com 2012-12-21 03:33:25 +00:00
parent 9f348578e7
commit ec623a851e
1 changed files with 12 additions and 11 deletions

View File

@ -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);