kernel: Use distinct macro names

There is a struct and a macro called _ready_q, this is error
prone. Just removing it.

MISRA-C rule 5.4

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This commit is contained in:
Flavio Ceolin 2018-10-24 12:47:18 -07:00 committed by Anas Nashif
commit a3dddedab6
3 changed files with 2 additions and 3 deletions

View file

@ -181,7 +181,6 @@ extern struct _kernel _kernel;
#define _current _kernel.current
#endif
#define _ready_q _kernel.ready_q
#define _timeout_q _kernel.timeout_q
#include <kernel_arch_func.h>

View file

@ -57,7 +57,7 @@ extern struct k_thread *_get_next_ready_thread(void);
#else
static ALWAYS_INLINE struct k_thread *_get_next_ready_thread(void)
{
return _ready_q.cache;
return _kernel.ready_q.cache;
}
#endif

View file

@ -319,7 +319,7 @@ static void prepare_multithreading(struct k_thread *dummy_thread)
* contain garbage, which would prevent the cache loading algorithm
* to work as intended
*/
_ready_q.cache = _main_thread;
_kernel.ready_q.cache = _main_thread;
#endif
_setup_new_thread(_main_thread, _main_stack,