git: cb65d4432aed - main - sys/cpuset.h: add 3 more macros provided by GLIBC

From: Stefan Eßer <se_at_FreeBSD.org>
Date: Fri, 31 Dec 2021 10:10:55 UTC
The branch main has been updated by se:

URL: https://cgit.FreeBSD.org/src/commit/?id=cb65d4432aed11a0cd77d2bd235d6f760ae91c38

commit cb65d4432aed11a0cd77d2bd235d6f760ae91c38
Author:     Stefan Eßer <se@FreeBSD.org>
AuthorDate: 2021-12-31 10:08:34 +0000
Commit:     Stefan Eßer <se@FreeBSD.org>
CommitDate: 2021-12-31 10:08:34 +0000

    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)
---
 sys/sys/cpuset.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/sys/sys/cpuset.h b/sys/sys/cpuset.h
index 9f777e3af523..5841fa37f28a 100644
--- a/sys/sys/cpuset.h
+++ b/sys/sys/cpuset.h
@@ -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
 
 /*