mirror of
https://github.com/anrieff/libcpuid
synced 2025-10-03 11:01:30 +00:00
Support get_total_cpus() on DragonFly BSD
Tested on DragonFly BSD 6: it works as expected.
This commit is contained in:
parent
505c8b5fe6
commit
3c37492b93
2 changed files with 3 additions and 3 deletions
|
@ -456,7 +456,7 @@ static bool set_cpu_affinity(logical_cpu_t logical_cpu)
|
|||
#define SET_CPU_AFFINITY
|
||||
#endif /* defined sun || defined __sun */
|
||||
|
||||
#if defined __FreeBSD__ || defined __OpenBSD__ || defined __NetBSD__ || defined __bsdi__ || defined __QNX__
|
||||
#if defined __FreeBSD__ || defined __DragonFly__ || defined __OpenBSD__ || defined __NetBSD__ || defined __bsdi__ || defined __QNX__
|
||||
#include <sys/types.h>
|
||||
#include <sys/sysctl.h>
|
||||
|
||||
|
@ -469,7 +469,7 @@ static int get_total_cpus(void)
|
|||
return ncpus;
|
||||
}
|
||||
#define GET_TOTAL_CPUS_DEFINED
|
||||
#endif /* defined __FreeBSD__ || defined __OpenBSD__ || defined __NetBSD__ || defined __bsdi__ || defined __QNX__ */
|
||||
#endif /* defined __FreeBSD__ || defined __DragonFly__ || defined __OpenBSD__ || defined __NetBSD__ || defined __bsdi__ || defined __QNX__ */
|
||||
|
||||
#if defined __FreeBSD__
|
||||
#include <sys/param.h>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue