mirror of
https://github.com/anrieff/libcpuid
synced 2024-12-16 16:35:45 +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
|
@ -22,7 +22,7 @@ libcpuid support varies depending on the features:
|
|||
|
||||
|Name|Build|x86 MSR|ARM CPUID|
|
||||
|----|----|-------|---------|
|
||||
|DragonFly BSD|:grey_question: |:grey_question: ([`cpuctl` kernel module](https://man.freebsd.org/cgi/man.cgi?query=cpuctl))|:x:|
|
||||
|DragonFly BSD|:heavy_check_mark: |:grey_question: ([`cpuctl` kernel module](https://man.freebsd.org/cgi/man.cgi?query=cpuctl))|:x:|
|
||||
|FreeBSD|:heavy_check_mark: |:heavy_check_mark: ([`cpuctl` kernel module](https://man.freebsd.org/cgi/man.cgi?query=cpuctl))|:heavy_check_mark:¹ ([`cpuid` out-of-tree kernel module](https://github.com/anrieff/libcpuid/tree/master/drivers/arm/freebsd))|
|
||||
|Linux|:heavy_check_mark: ![UNIX workflow status](https://github.com/anrieff/libcpuid/actions/workflows/unix.yml/badge.svg)|:heavy_check_mark: ([`msr` kernel module](https://man7.org/linux/man-pages/man4/msr.4.html))|:heavy_check_mark:¹ ([`cpuid` out-of-tree kernel module](https://github.com/anrieff/libcpuid/tree/master/drivers/arm/linux))|
|
||||
|macOS|:heavy_check_mark: ![UNIX workflow status](https://github.com/anrieff/libcpuid/actions/workflows/unix.yml/badge.svg)|:x:|:x:|
|
||||
|
|
|
@ -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…
Reference in a new issue