From aa0cd0ab474e6ba27dced833ef5ea440a3eabeb2 Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Tue, 8 Nov 2016 09:02:30 +0800 Subject: [PATCH] spi_flash: add missing volatile qualifier for lock flags http://esp32.com/viewtopic.php?f=14&t=419&p=1901 --- components/spi_flash/cache_utils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/spi_flash/cache_utils.c b/components/spi_flash/cache_utils.c index 6ae47bdb3e..904007b316 100644 --- a/components/spi_flash/cache_utils.c +++ b/components/spi_flash/cache_utils.c @@ -38,8 +38,8 @@ static uint32_t s_flash_op_cache_state[2]; #ifndef CONFIG_FREERTOS_UNICORE static SemaphoreHandle_t s_flash_op_mutex; -static bool s_flash_op_can_start = false; -static bool s_flash_op_complete = false; +static volatile bool s_flash_op_can_start = false; +static volatile bool s_flash_op_complete = false; void spi_flash_init_lock() {