Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F142022792
D54474.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
565 B
Referenced Files
None
Subscribers
None
D54474.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D54474: smp: Use bitwise operation to count cpu number
Attached
Detach File
Event Timeline
Log In to Comment