From d183b65d5c0e4a3bb8dc2926b14d7befa2fecf09 Mon Sep 17 00:00:00 2001 From: armando Date: Thu, 5 Mar 2026 15:10:23 +0800 Subject: [PATCH] change(mmu): added mutex for public get apis --- components/esp_mm/esp_mmu_map.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/esp_mm/esp_mmu_map.c b/components/esp_mm/esp_mmu_map.c index 98830af516..1508d3c8bf 100644 --- a/components/esp_mm/esp_mmu_map.c +++ b/components/esp_mm/esp_mmu_map.c @@ -279,6 +279,7 @@ esp_err_t esp_mmu_map_get_max_consecutive_free_block_size(mmu_mem_caps_t caps, m ESP_RETURN_ON_ERROR(s_mem_caps_check(caps), TAG, "invalid caps"); *out_len = 0; + _lock_acquire(&s_mmu_ctx.mutex); size_t max = 0; for (int i = 0; i < s_mmu_ctx.num_regions; i++) { @@ -290,6 +291,7 @@ esp_err_t esp_mmu_map_get_max_consecutive_free_block_size(mmu_mem_caps_t caps, m } *out_len = max; + _lock_release(&s_mmu_ctx.mutex); return ESP_OK; }