mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-20 11:11:24 +00:00
Avoid breaking strict-aliasing.
This commit is contained in:
parent
7d456f2f3f
commit
7cafb27f94
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/projects/largeSMP/; revision=221736
@ -141,6 +141,7 @@ pmcc_do_enable_disable(struct pmcc_op_list *op_list)
|
||||
unsigned char *map;
|
||||
unsigned char op;
|
||||
int cpu, pmc;
|
||||
size_t setsize;
|
||||
|
||||
if ((ncpu = pmc_ncpu()) < 0)
|
||||
err(EX_OSERR, "Unable to determine the number of cpus");
|
||||
@ -152,8 +153,9 @@ pmcc_do_enable_disable(struct pmcc_op_list *op_list)
|
||||
"halted");
|
||||
}
|
||||
CPU_ZERO(&haltedcpus);
|
||||
setsize = (size_t)cpusetsize;
|
||||
if (ncpu > 1 && sysctlbyname("machdep.hlt_cpus", &haltedcpus,
|
||||
(size_t *)&cpusetsize, NULL, 0) < 0)
|
||||
&setsize, NULL, 0) < 0)
|
||||
err(EX_OSERR, "ERROR: Cannot determine which CPUs are "
|
||||
"halted");
|
||||
CPU_FILL(&cpumask);
|
||||
|
Loading…
Reference in New Issue
Block a user