mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
bt: fix OS abstraction layer for correct critical section API usage
Signed-off-by: Mahavir Jain <mahavir@espressif.com>
This commit is contained in:
parent
abbccb7acd
commit
bd177a34c6
@ -254,12 +254,20 @@ bool IRAM_ATTR btdm_queue_generic_deregister(btdm_queue_item_t *queue)
|
||||
|
||||
static void IRAM_ATTR interrupt_disable(void)
|
||||
{
|
||||
portENTER_CRITICAL(&global_int_mux);
|
||||
if (xPortInIsrContext()) {
|
||||
portENTER_CRITICAL_ISR(&global_int_mux);
|
||||
} else {
|
||||
portENTER_CRITICAL(&global_int_mux);
|
||||
}
|
||||
}
|
||||
|
||||
static void IRAM_ATTR interrupt_restore(void)
|
||||
{
|
||||
portEXIT_CRITICAL(&global_int_mux);
|
||||
if (xPortInIsrContext()) {
|
||||
portEXIT_CRITICAL_ISR(&global_int_mux);
|
||||
} else {
|
||||
portEXIT_CRITICAL(&global_int_mux);
|
||||
}
|
||||
}
|
||||
|
||||
static void IRAM_ATTR task_yield_from_isr(void)
|
||||
|
Loading…
Reference in New Issue
Block a user