From 5f97b51cff84f59438285a051633b712f6c4f5d6 Mon Sep 17 00:00:00 2001 From: Shengwen Cheng Date: Mon, 20 May 2024 01:10:52 +0800 Subject: [PATCH] Declare initialization variable of FIFO example task as volatile --- user/tasks/examples/fifo-ex.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user/tasks/examples/fifo-ex.c b/user/tasks/examples/fifo-ex.c index e2eaec80..ab0998f2 100644 --- a/user/tasks/examples/fifo-ex.c +++ b/user/tasks/examples/fifo-ex.c @@ -13,7 +13,7 @@ #define TEST_STR "[fifo example] hello world\n\r" #define LEN strlen(TEST_STR) -static bool fifo_init_ready = false; +static volatile bool fifo_init_ready = false; void fifo_task1(void) {