Merge pull request #4759 from mysterywolf/rt_tick

[kernel] 对rt_tick变量增加volatile修饰,防止编译器优化时出现问题
This commit is contained in:
Bernard Xiong 2021-06-03 23:52:38 +08:00 committed by GitHub
commit 2884700817
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -23,7 +23,7 @@
#ifdef RT_USING_SMP
#define rt_tick rt_cpu_index(0)->tick
#else
static rt_tick_t rt_tick = 0;
static volatile rt_tick_t rt_tick = 0;
#endif
/**