mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-01-30 02:40:24 +08:00
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:
parent
9f348578e7
commit
ec623a851e
23
src/irq.c
23
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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user