zephyr/kernel
Kumar Gala a1195ae39b smp: Move for loops to use arch_num_cpus instead of CONFIG_MP_NUM_CPUS
Change for loops of the form:

for (i = 0; i < CONFIG_MP_NUM_CPUS; i++)
   ...

to

unsigned int num_cpus = arch_num_cpus();
for (i = 0; i < num_cpus; i++)
   ...

We do the call outside of the for loop so that it only happens once,
rather than on every iteration.

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2022-10-21 13:14:58 +02:00
..
include smp: Move arrays to use CONFIG_MP_MAX_NUM_CPUS 2022-10-17 14:40:12 +09:00
paging
CMakeLists.txt
Kconfig smp: Kconfig: Move to using MP_MAX_NUM_CPUS 2022-10-20 22:04:10 +09:00
Kconfig.vm
atomic_c.c
banner.c
compiler_stack_protect.c
condvar.c
device.c kernel: move z_sys_init_run_level to init.c 2022-10-12 18:49:12 +09:00
errno.c
events.c
fatal.c
futex.c
idle.c kernel: idle: fix -Werror=misleading-indentation 2022-10-12 18:43:15 +02:00
init.c smp: Move arrays to use CONFIG_MP_MAX_NUM_CPUS 2022-10-17 14:40:12 +09:00
kheap.c kernel: kheap: fix k_heap_aligned_alloc handling of K_FOREVER 2022-09-29 10:39:12 -05:00
mailbox.c
main_weak.c
mem_domain.c
mem_slab.c
mempool.c
mmu.c
msg_q.c
mutex.c
pipes.c kernel: allow k_poll to wait on pipes 2022-08-24 17:49:20 +00:00
poll.c kernel: allow k_poll to wait on pipes 2022-08-24 17:49:20 +00:00
queue.c
sched.c smp: Move for loops to use arch_num_cpus instead of CONFIG_MP_NUM_CPUS 2022-10-21 13:14:58 +02:00
sem.c
smp.c smp: Move for loops to use arch_num_cpus instead of CONFIG_MP_NUM_CPUS 2022-10-21 13:14:58 +02:00
stack.c
system_work_q.c
thread.c smp: Move for loops to use arch_num_cpus instead of CONFIG_MP_NUM_CPUS 2022-10-21 13:14:58 +02:00
timeout.c
timer.c tracing: ctf: add timer support 2022-08-31 16:04:01 -04:00
usage.c smp: Move for loops to use arch_num_cpus instead of CONFIG_MP_NUM_CPUS 2022-10-21 13:14:58 +02:00
userspace.c
userspace_handler.c
version.c
work.c
xip.c