sys/cpuset.h: add 3 more macros provided by GLIBC

The lang/python* ports failed since they expected CPU_COUNT_S() to be
provided by sys/cpuset.h. Add this function plus 2 more in a way that
is compatible with GLIBC.

Reported by:	ler at lerctr.org (Larry Rosenman)
This commit is contained in:
Stefan Eßer 2021-12-31 11:08:34 +01:00
parent b7810e05ff
commit cb65d4432a

View file

@ -82,11 +82,15 @@
#define CPU_ISSET_S(n, _s, p) __BIT_ISSET(_s, n, p)
#define CPU_SET_S(n, _s, p) __BIT_SET(_s, n, p)
#define CPU_CLR_S(n, _s, p) __BIT_CLR(_s, n, p)
#define CPU_ZERO_S(_s, p) __BIT_ZERO(_s, p)
#define CPU_OR_S(_s, d, s1, s2) __BIT_OR2(_s, d, s1, s2)
#define CPU_AND_S(_s, d, s1, s2) __BIT_AND2(_s, d, s1, s2)
#define CPU_XOR_S(_s, d, s1, s2) __BIT_XOR2(_s, d, s1, s2)
#define CPU_COUNT_S(_s, p) ((int)__BIT_COUNT(_s, p))
#define CPU_EQUAL_S(p, c) (__BIT_CMP(_s, p, c) == 0)
#endif
/*