Merge branch 'bugfix/bt_os_abstraction_layer' into 'master'

bt: fix OS abstraction layer for correct critical section API usage

See merge request idf/esp-idf!2676
This commit is contained in:
Ivan Grokhotkov 2018-07-02 18:42:07 +08:00
commit 32ff393afa

View file

@ -254,12 +254,20 @@ bool IRAM_ATTR btdm_queue_generic_deregister(btdm_queue_item_t *queue)
static void IRAM_ATTR interrupt_disable(void) static void IRAM_ATTR interrupt_disable(void)
{ {
if (xPortInIsrContext()) {
portENTER_CRITICAL_ISR(&global_int_mux);
} else {
portENTER_CRITICAL(&global_int_mux); portENTER_CRITICAL(&global_int_mux);
}
} }
static void IRAM_ATTR interrupt_restore(void) static void IRAM_ATTR interrupt_restore(void)
{ {
if (xPortInIsrContext()) {
portEXIT_CRITICAL_ISR(&global_int_mux);
} else {
portEXIT_CRITICAL(&global_int_mux); portEXIT_CRITICAL(&global_int_mux);
}
} }
static void IRAM_ATTR task_yield_from_isr(void) static void IRAM_ATTR task_yield_from_isr(void)