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:
parent
69ed754010
commit
2159f73eaa
1 changed files with 11 additions and 0 deletions
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue