mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-09-30 02:24:06 +08:00
The rt_list_isempty has prototype of "int rt_list_isempty(const rt_list_t *l)". So the compiler has a good reason that the rt_thread_defunct list does not change within rt_thread_idle_excute thus optimize the "while" loop into a "if". So add the volatile qualifier when test against the rt_thread_defunc list.