kernel: smp: avoid identifier collisions
MISRA-C Rule 5.3 states that identifiers in inner scope should not hide identifiers in outer scope. In the function smp_init_top(), the variable "start_flags" collide with global variable of the same name. So rename the one inside the function. Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This commit is contained in:
parent
4fc1444823
commit
ac53880cef
1 changed files with 2 additions and 2 deletions
|
@ -63,11 +63,11 @@ void z_smp_release_global_lock(struct k_thread *thread)
|
|||
#if CONFIG_MP_NUM_CPUS > 1
|
||||
static FUNC_NORETURN void smp_init_top(void *arg)
|
||||
{
|
||||
atomic_t *start_flag = arg;
|
||||
atomic_t *cpu_start_flag = arg;
|
||||
struct k_thread dummy_thread;
|
||||
|
||||
/* Wait for the signal to begin scheduling */
|
||||
while (!atomic_get(start_flag)) {
|
||||
while (!atomic_get(cpu_start_flag)) {
|
||||
}
|
||||
|
||||
z_dummy_thread_init(&dummy_thread);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue