Page MenuHomeFreeBSD

D54474.diff
No OneTemporary

D54474.diff

diff --git a/sys/kern/subr_smp.c b/sys/kern/subr_smp.c
--- a/sys/kern/subr_smp.c
+++ b/sys/kern/subr_smp.c
@@ -554,7 +554,7 @@
void (* teardown_func)(void *),
void *arg)
{
- int curcpumap, i, ncpus = 0;
+ int curcpumap, ncpus = 0;
/* See comments in the !SMP case. */
if (!smp_started) {
@@ -575,10 +575,8 @@
*/
MPASS(curthread->td_md.md_spinlock_count == 0);
- CPU_FOREACH(i) {
- if (CPU_ISSET(i, &map))
- ncpus++;
- }
+ CPU_AND(&map, &map, &all_cpus);
+ ncpus = CPU_COUNT(&map);
if (ncpus == 0)
panic("ncpus is 0 with non-zero map");

File Metadata

Mime Type
text/plain
Expires
Fri, Jan 16, 1:49 AM (17 h, 52 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27485811
Default Alt Text
D54474.diff (565 B)

Event Timeline