cpuset(9): Add CPU_FOREACH_IS(SET|CLR) and modify consumers to use it
This implementation is faster and doesn't modify the cpuset, so it lets us avoid some unnecessary copying as well. No functional change intended. This is a re-application of commit 9068f6ea697b1b28ad1326a4c7a9ba86f08b985e. Reviewed by: cem, kib, jhb MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D32029
This commit is contained in:
parent
27e8401c46
commit
6070714e0f
|
@ -62,6 +62,8 @@
|
||||||
#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_ISCLR(i, p) BIT_FOREACH_ISCLR(CPU_SETSIZE, i, 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
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue