CPU masks
CPU masks are used in sched_get_affinity()/sched_set_affinitity() functions
they contain set of cpuid's, on that thread is allowed to run.
cpuid is id of strand object taken from libhostinfo
Functions
cpumask_create
publicplat
Allocate and initialize new CPU mask
LIBEXPORT PLATAPI cpumask_t* cpumask_create()
cpumask_destroy
publicplat
Destroy CPU mask
LIBEXPORT PLATAPI void cpumask_destroy(cpumask_t* mask)
cpumask_reset
publicplat
Remove all CPUs from mask
LIBEXPORT PLATAPI void cpumask_reset(cpumask_t* mask)
cpumask_set
publicplat
Add CPU to mask
LIBEXPORT PLATAPI void cpumask_set(cpumask_t* mask, int cpuid)
cpumask_clear
publicplat
Remove CPU from mask
LIBEXPORT PLATAPI void cpumask_clear(cpumask_t* mask, int cpuid)
cpumask_isset
publicplat
Test to see if CPU is inside this mask
LIBEXPORT PLATAPI boolean_t cpumask_isset(cpumask_t* mask, int cpuid)
cpumask_count
publicplat
Returns count of CPUs in mask
LIBEXPORT PLATAPI int cpumask_count(cpumask_t* mask)
cpumask_eq
publicplat
Returns B_TRUE if masks a and b are equal
LIBEXPORT PLATAPI boolean_t cpumask_eq(cpumask_t* a, cpumask_t* b)
cpumask_contains
publicplat
Returns B_TRUE if b is submask of a
LIBEXPORT PLATAPI boolean_t cpumask_contains(cpumask_t* a, cpumask_t* b)
cpumask_or
publicplat
Returns new CPU mask that contains CPUs that are included in
both a and b masks (similiar to boolean or)
NOTES
Resulting mask should be freed with cpumask_destroy()
LIBEXPORT PLATAPI cpumask_t* cpumask_or(cpumask_t* a, cpumask_t* b)