sys: Extract CPUMASK macros to new <machine/cpumask.h>
authorzrj <rimvydas.jasinskas@gmail.com>
Tue, 19 Jul 2016 07:07:45 +0000 (10:07 +0300)
committerzrj <zrj@dragonflybsd.org>
Sun, 24 Jul 2016 18:00:22 +0000 (21:00 +0300)
commitb976e2c27a272fede34b02d1900430d3d5ccd624
tree2eeb8d480ed6f82cb4a7f2483d0e146dffd41404
parent743146ae2a6000d439d5977d490403d7fdf54979
sys: Extract CPUMASK macros to new <machine/cpumask.h>

There are plenty enough CPUMASK macros already for them to have their own header.
So far only userspace users are powerd(8), usched(8) and kern_usched.c(VKERNEL64).
After recent change to expose kernel internal CPUMASK macros those got available
for userland codes even through <time.h> header. It is better to avoid that.
Also this reduces POSIX namespace pollution and keeps cpu/types.h header slim.

For now leave CPUMASK_ELEMENTS (not sure about ASSYM() macro handling the _ prefix)
and cpumask_t typedef (forward decl of struct cpumask would be better in prototypes).
sbin/usched/usched.c
sys/cpu/x86_64/include/cpumask.h [copied from sys/cpu/x86_64/include/types.h with 68% similarity]
sys/cpu/x86_64/include/param.h
sys/cpu/x86_64/include/types.h
sys/kern/kern_usched.c
sys/platform/pc64/apic/lapic.h
sys/sys/cpu_topology.h
sys/sys/thread2.h
usr.sbin/powerd/powerd.c