Page MenuHomeFreeBSD

D54474.id172137.diff
No OneTemporary

D54474.id172137.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
@@ -588,7 +588,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) {
@@ -609,10 +609,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
Mon, Mar 2, 7:26 PM (5 h, 3 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28874959
Default Alt Text
D54474.id172137.diff (565 B)

Event Timeline