actually just query for HW_NCPU on all BSDs.

This commit is contained in:
Joris Vink 2018-10-25 19:31:48 +02:00
parent 9d9e9dcec2
commit ea7ea48840
1 changed files with 0 additions and 4 deletions

View File

@ -48,7 +48,6 @@ static char pledges[256] = { "stdio rpath inet error" };
void
kore_platform_init(void)
{
#if defined(__MACH__) || defined(__FreeBSD_version)
long n;
size_t len = sizeof(n);
int mib[] = { CTL_HW, HW_NCPU };
@ -59,9 +58,6 @@ kore_platform_init(void)
} else {
cpu_count = (u_int16_t)n;
}
#else
cpu_count = 1;
#endif /* __MACH__ || __FreeBSD_version */
}
void