RFC: Adding a hw.features[2] sysctl

Igor Mozolevsky igor at hybrid-lab.co.uk
Sun Jan 13 17:21:17 PST 2008


On 13/01/2008, Peter Jeremy <peterjeremy at optushome.com.au> wrote:

> IMHO, no.  Virtually all similar FreeBSD information is exported via
> sysctl and this sort of information fits neatly into the existing
> MIB tree as either dev.cpu.N.features or hw.cpu.features

/dev/sndstat?

If it's in /dev you can do neat tricks like ioctl-ing queries (like
ioctl(/dev/cpuinfo, CINFOCTL_HAS_FEATURES, CINFO_SSE3|CINFO_SSSE3))
instead of having *every* app parse the result of a sysctl; most of
the time you'd only want to check for specific feature , it's much
easier to do an ioctl that returns a boolean.

Igor


More information about the freebsd-current mailing list