mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-10 04:43:33 +00:00
fix bug that semaphore may schedule out in Critical Section
1. Since BLE full-scan feature for BLE mesh change the controller code cause this problem, it cause coex semaphore take in "interrupt disable", then it may cause task schedule and cause crash in freertos 2. Fix newlib lock ISR context and critical section check 3. Fix bt controller ISR context and critical section check
This commit is contained in:

committed by
Jiang Jiang Jian

parent
758db1e008
commit
4987a5ad90
@@ -508,6 +508,11 @@ void IRAM_ATTR coex_bb_reset_unlock_wrapper(uint32_t restore)
|
||||
#endif
|
||||
}
|
||||
|
||||
int32_t IRAM_ATTR coex_is_in_isr_wrapper(void)
|
||||
{
|
||||
return !xPortCanYield();
|
||||
}
|
||||
|
||||
wifi_osi_funcs_t g_wifi_osi_funcs = {
|
||||
._version = ESP_WIFI_OS_ADAPTER_VERSION,
|
||||
._set_isr = set_isr_wrapper,
|
||||
@@ -617,7 +622,7 @@ coex_adapter_funcs_t g_coex_adapter_funcs = {
|
||||
._semphr_give_from_isr = semphr_give_from_isr_wrapper,
|
||||
._semphr_take = semphr_take_wrapper,
|
||||
._semphr_give = semphr_give_wrapper,
|
||||
._is_in_isr = xPortInIsrContext,
|
||||
._is_in_isr = coex_is_in_isr_wrapper,
|
||||
._malloc_internal = malloc_internal_wrapper,
|
||||
._free = free,
|
||||
._timer_disarm = timer_disarm_wrapper,
|
||||
|
Reference in New Issue
Block a user