Changeset View
Changeset View
Standalone View
Standalone View
sys/sys/cpuset.h
Show All 37 Lines | |||||
#include <sys/bitset.h> | #include <sys/bitset.h> | ||||
#define _NCPUBITS _BITSET_BITS | #define _NCPUBITS _BITSET_BITS | ||||
#define _NCPUWORDS __bitset_words(CPU_SETSIZE) | #define _NCPUWORDS __bitset_words(CPU_SETSIZE) | ||||
#define CPUSETBUFSIZ ((2 + sizeof(long) * 2) * _NCPUWORDS) | #define CPUSETBUFSIZ ((2 + sizeof(long) * 2) * _NCPUWORDS) | ||||
#define CPU_CLR(n, p) BIT_CLR(CPU_SETSIZE, n, p) | #define CPU_CLR(n, p) __BIT_CLR(CPU_SETSIZE, n, p) | ||||
#define CPU_COPY(f, t) BIT_COPY(CPU_SETSIZE, f, t) | #define CPU_COPY(f, t) __BIT_COPY(CPU_SETSIZE, f, t) | ||||
#define CPU_ISSET(n, p) BIT_ISSET(CPU_SETSIZE, n, p) | #define CPU_ISSET(n, p) __BIT_ISSET(CPU_SETSIZE, n, p) | ||||
#define CPU_SET(n, p) BIT_SET(CPU_SETSIZE, n, p) | #define CPU_SET(n, p) __BIT_SET(CPU_SETSIZE, n, p) | ||||
#define CPU_ZERO(p) BIT_ZERO(CPU_SETSIZE, p) | #define CPU_ZERO(p) __BIT_ZERO(CPU_SETSIZE, p) | ||||
#define CPU_FILL(p) BIT_FILL(CPU_SETSIZE, p) | #define CPU_FILL(p) __BIT_FILL(CPU_SETSIZE, p) | ||||
#define CPU_SETOF(n, p) BIT_SETOF(CPU_SETSIZE, n, p) | #define CPU_SETOF(n, p) __BIT_SETOF(CPU_SETSIZE, n, p) | ||||
#define CPU_EQUAL(p, c) (BIT_CMP(CPU_SETSIZE, p, c) == 0) | #define CPU_EQUAL(p, c) (__BIT_CMP(CPU_SETSIZE, p, c) == 0) | ||||
#define CPU_EMPTY(p) BIT_EMPTY(CPU_SETSIZE, p) | #define CPU_EMPTY(p) __BIT_EMPTY(CPU_SETSIZE, p) | ||||
#define CPU_ISFULLSET(p) BIT_ISFULLSET(CPU_SETSIZE, p) | #define CPU_ISFULLSET(p) __BIT_ISFULLSET(CPU_SETSIZE, p) | ||||
#define CPU_SUBSET(p, c) BIT_SUBSET(CPU_SETSIZE, p, c) | #define CPU_SUBSET(p, c) __BIT_SUBSET(CPU_SETSIZE, p, c) | ||||
#define CPU_OVERLAP(p, c) BIT_OVERLAP(CPU_SETSIZE, p, c) | #define CPU_OVERLAP(p, c) __BIT_OVERLAP(CPU_SETSIZE, p, c) | ||||
#define CPU_CMP(p, c) BIT_CMP(CPU_SETSIZE, p, c) | #define CPU_CMP(p, c) __BIT_CMP(CPU_SETSIZE, p, c) | ||||
#define CPU_OR(d, s) BIT_OR(CPU_SETSIZE, d, s) | #define CPU_OR(d, s) __BIT_OR(CPU_SETSIZE, d, s) | ||||
#define CPU_AND(d, s) BIT_AND(CPU_SETSIZE, d, s) | #define CPU_AND(d, s) __BIT_AND(CPU_SETSIZE, d, s) | ||||
#define CPU_ANDNOT(d, s) BIT_ANDNOT(CPU_SETSIZE, d, s) | #define CPU_ANDNOT(d, s) __BIT_ANDNOT(CPU_SETSIZE, d, s) | ||||
#define CPU_CLR_ATOMIC(n, p) BIT_CLR_ATOMIC(CPU_SETSIZE, n, p) | #define CPU_CLR_ATOMIC(n, p) __BIT_CLR_ATOMIC(CPU_SETSIZE, n, p) | ||||
#define CPU_SET_ATOMIC(n, p) BIT_SET_ATOMIC(CPU_SETSIZE, n, p) | #define CPU_SET_ATOMIC(n, p) __BIT_SET_ATOMIC(CPU_SETSIZE, n, p) | ||||
#define CPU_SET_ATOMIC_ACQ(n, p) BIT_SET_ATOMIC_ACQ(CPU_SETSIZE, n, p) | #define CPU_SET_ATOMIC_ACQ(n, p) __BIT_SET_ATOMIC_ACQ(CPU_SETSIZE, n, p) | ||||
#define CPU_AND_ATOMIC(n, p) BIT_AND_ATOMIC(CPU_SETSIZE, n, p) | #define CPU_AND_ATOMIC(n, p) __BIT_AND_ATOMIC(CPU_SETSIZE, n, p) | ||||
#define CPU_OR_ATOMIC(d, s) BIT_OR_ATOMIC(CPU_SETSIZE, d, s) | #define CPU_OR_ATOMIC(d, s) __BIT_OR_ATOMIC(CPU_SETSIZE, d, s) | ||||
#define CPU_COPY_STORE_REL(f, t) BIT_COPY_STORE_REL(CPU_SETSIZE, f, t) | #define CPU_COPY_STORE_REL(f, t) __BIT_COPY_STORE_REL(CPU_SETSIZE, f, t) | ||||
#define CPU_FFS(p) BIT_FFS(CPU_SETSIZE, p) | #define CPU_FFS(p) __BIT_FFS(CPU_SETSIZE, p) | ||||
#define CPU_FLS(p) BIT_FLS(CPU_SETSIZE, p) | #define CPU_FLS(p) __BIT_FLS(CPU_SETSIZE, p) | ||||
#define CPU_FOREACH_ISSET(i, p) BIT_FOREACH_ISSET(CPU_SETSIZE, i, p) | #define CPU_FOREACH_ISSET(i, p) __BIT_FOREACH_ISSET(CPU_SETSIZE, i, p) | ||||
#define CPU_FOREACH_ISCLR(i, p) BIT_FOREACH_ISCLR(CPU_SETSIZE, i, p) | #define CPU_FOREACH_ISCLR(i, p) __BIT_FOREACH_ISCLR(CPU_SETSIZE, i, p) | ||||
#define CPU_COUNT(p) ((int)BIT_COUNT(CPU_SETSIZE, p)) | #define CPU_COUNT(p) ((int)__BIT_COUNT(CPU_SETSIZE, p)) | ||||
#define CPUSET_FSET BITSET_FSET(_NCPUWORDS) | #define CPUSET_FSET BITSET_FSET(_NCPUWORDS) | ||||
#define CPUSET_T_INITIALIZER BITSET_T_INITIALIZER | #define CPUSET_T_INITIALIZER BITSET_T_INITIALIZER | ||||
/* | /* | ||||
* Valid cpulevel_t values. | * Valid cpulevel_t values. | ||||
*/ | */ | ||||
#define CPU_LEVEL_ROOT 1 /* All system cpus. */ | #define CPU_LEVEL_ROOT 1 /* All system cpus. */ | ||||
#define CPU_LEVEL_CPUSET 2 /* Available cpus for which. */ | #define CPU_LEVEL_CPUSET 2 /* Available cpus for which. */ | ||||
▲ Show 20 Lines • Show All 83 Lines • Show Last 20 Lines |