mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-02 04:04:31 +02:00
Merge branch 'Bugfix/esp_event' into 'master'
Bugfix/esp_event fix misuse of recursive semaphore take/give calls for profiling_mutex Closes IDFGH-4246 See merge request espressif/esp-idf!11454
This commit is contained in:
@@ -641,7 +641,7 @@ esp_err_t esp_event_loop_delete(esp_event_loop_handle_t event_loop)
|
|||||||
xSemaphoreTakeRecursive(loop->mutex, portMAX_DELAY);
|
xSemaphoreTakeRecursive(loop->mutex, portMAX_DELAY);
|
||||||
|
|
||||||
#ifdef CONFIG_ESP_EVENT_LOOP_PROFILING
|
#ifdef CONFIG_ESP_EVENT_LOOP_PROFILING
|
||||||
xSemaphoreTakeRecursive(loop->profiling_mutex, portMAX_DELAY);
|
xSemaphoreTake(loop->profiling_mutex, portMAX_DELAY);
|
||||||
portENTER_CRITICAL(&s_event_loops_spinlock);
|
portENTER_CRITICAL(&s_event_loops_spinlock);
|
||||||
SLIST_REMOVE(&s_event_loops, loop, esp_event_loop_instance, next);
|
SLIST_REMOVE(&s_event_loops, loop, esp_event_loop_instance, next);
|
||||||
portEXIT_CRITICAL(&s_event_loops_spinlock);
|
portEXIT_CRITICAL(&s_event_loops_spinlock);
|
||||||
@@ -672,7 +672,7 @@ esp_err_t esp_event_loop_delete(esp_event_loop_handle_t event_loop)
|
|||||||
// Free loop mutex before deleting
|
// Free loop mutex before deleting
|
||||||
xSemaphoreGiveRecursive(loop_mutex);
|
xSemaphoreGiveRecursive(loop_mutex);
|
||||||
#ifdef CONFIG_ESP_EVENT_LOOP_PROFILING
|
#ifdef CONFIG_ESP_EVENT_LOOP_PROFILING
|
||||||
xSemaphoreGiveRecursive(loop_profiling_mutex);
|
xSemaphoreGive(loop_profiling_mutex);
|
||||||
vSemaphoreDelete(loop_profiling_mutex);
|
vSemaphoreDelete(loop_profiling_mutex);
|
||||||
#endif
|
#endif
|
||||||
vSemaphoreDelete(loop_mutex);
|
vSemaphoreDelete(loop_mutex);
|
||||||
|
Reference in New Issue
Block a user