MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / rt_interrupt_get_nest

Function rt_interrupt_get_nest

src/irq.c:136–145  ·  view source on GitHub ↗

* @brief This function will return the nest of interrupt. * * User application can invoke this function to get whether current * context is interrupt context. * * @return the number of nested interrupts. */

Source from the content-addressed store, hash-verified

134 * @return the number of nested interrupts.
135 */
136rt_weak rt_uint8_t rt_interrupt_get_nest(void)
137{
138 rt_uint8_t ret;
139 rt_base_t level;
140
141 level = rt_hw_local_irq_disable();
142 ret = rt_atomic_load(&rt_interrupt_nest);
143 rt_hw_local_irq_enable(level);
144 return ret;
145}
146RTM_EXPORT(rt_interrupt_get_nest);
147
148RTM_EXPORT(rt_hw_interrupt_disable);

Callers 15

rt_can_writeFunction · 0.85
rt_smp_call_ipi_handlerFunction · 0.85
_readFunction · 0.85
_writeFunction · 0.85
get_log_bufFunction · 0.85
ulog_head_formaterFunction · 0.85
do_outputFunction · 0.85
syslog_formaterFunction · 0.85
pico_get_errnoFunction · 0.85
uart_putcFunction · 0.85
hal_interrupt_get_nestFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected