lib: os: p4wq: Convert CONFIG_MP_NUM_CPUS handling

Move runtime checks to use arch_num_cpus().  This is to allow
runtime determination of the number of CPUs in the future.

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
This commit is contained in:
Kumar Gala 2022-10-26 14:31:14 -05:00 committed by Carles Cufí
commit 9be0914885

View file

@ -251,7 +251,7 @@ void k_p4wq_submit(struct k_p4wq *queue, struct k_p4wq_work *item)
* preempted and we can return.
*/
struct k_p4wq_work *wi;
uint32_t n_beaten_by = 0, active_target = CONFIG_MP_NUM_CPUS;
uint32_t n_beaten_by = 0, active_target = arch_num_cpus();
SYS_DLIST_FOR_EACH_CONTAINER(&queue->active, wi, dlnode) {
/*