1
0
Fork 0
mirror of https://github.com/anrieff/libcpuid synced 2024-11-10 22:59:13 +00:00

Add support for get_total_cpus on Haiku.

This commit is contained in:
Robert Kausch 2019-10-29 20:38:55 +01:00
parent 69ed754010
commit 2159f73eaa

View file

@ -114,6 +114,17 @@ static int get_total_cpus(void)
#define GET_TOTAL_CPUS_DEFINED
#endif
#ifdef __HAIKU__
#include <OS.h>
static int get_total_cpus(void)
{
system_info info;
get_system_info(&info);
return info.cpu_count;
}
#define GET_TOTAL_CPUS_DEFINED
#endif
#if defined linux || defined __linux__ || defined __sun
#include <sys/sysinfo.h>
#include <unistd.h>