diff options
| author | [email protected] <[email protected]> | 2011-06-14 23:59:42 +0000 |
|---|---|---|
| committer | [email protected] <[email protected]> | 2011-06-14 23:59:42 +0000 |
| commit | ee68988518f8aa2b7cdafc2bcfe0abe6ad7df385 (patch) | |
| tree | c673b27eee805e37c3c138e4e1d4c3596f985c9b /src/irq.c | |
| parent | 99dc4465a66d757b1a94220b513d30e647861b4c (diff) | |
change the RT_DEBUG_NOT_REENT to RT_DEBUG_NOT_IN_INTERRUPT.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1503 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'src/irq.c')
| -rw-r--r-- | src/irq.c | 16 |
1 files changed, 13 insertions, 3 deletions
@@ -37,8 +37,6 @@ void rt_interrupt_enter() { rt_base_t level; - RT_DEBUG_REENT_IN - RT_DEBUG_LOG(RT_DEBUG_IRQ,("irq comming..., irq nest:%d\n", rt_interrupt_nest)); level = rt_hw_interrupt_disable(); @@ -62,8 +60,20 @@ void rt_interrupt_leave() level = rt_hw_interrupt_disable(); rt_interrupt_nest --; rt_hw_interrupt_enable(level); +} - RT_DEBUG_REENT_OUT +/** + * This function will return the nest of interrupt. + * + * User application can invoke this function to get whenther current + * context is interrupt context. + * + * @return the number of nested interrupts. + */ +rt_uint8_t rt_interrupt_get_nest(void) +{ + return rt_interrupt_nest; } /*@}*/ + |
