mirror of
https://github.com/opnsense/src.git
synced 2026-06-14 19:20:18 -04:00
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:
parent
b7810e05ff
commit
cb65d4432a
1 changed files with 4 additions and 0 deletions
|
|
@ -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
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in a new issue