sched: Exit immediately when cpuset change to 0.

Exit immediately when finished processing the current CPU
if there are no other CPUs to be processed.

Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
This commit is contained in:
zhangyuan21 2023-10-18 16:55:37 +08:00 committed by Xiang Xiao
parent a98650f609
commit 083c87b39a

View File

@ -235,6 +235,11 @@ int nxsched_smp_call(cpu_set_t cpuset, nxsched_smp_call_t func,
CPU_CLR(this_cpu(), &cpuset);
}
if (CPU_COUNT(&cpuset) == 0)
{
goto out;
}
/* If waiting is necessary, initialize and wait for the cookie. */
if (wait)