[kernel] 对rt_tick变量增加volatile修饰,防止编译器优化时出现问题

This commit is contained in:
Meco Man 2021-06-03 20:09:26 +08:00
parent 52a66cc96f
commit e0b66ccab8

View File

@ -22,7 +22,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
/**