From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1921) id 8CDA73850209; Fri, 24 Jun 2022 05:42:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8CDA73850209 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Sebastian Huber To: newlib-cvs@sourceware.org Subject: [newlib-cygwin] cpuset(9): Add CPU_FOREACH_IS(SET|CLR) and modify consumers to use it X-Act-Checkin: newlib-cygwin X-Git-Author: Mark Johnston X-Git-Refname: refs/heads/master X-Git-Oldrev: 37a3e59636c01a0246b96e4432670b8afcfb7e80 X-Git-Newrev: 112245b78f535e9e735322d42167766856399b48 Message-Id: <20220624054254.8CDA73850209@sourceware.org> Date: Fri, 24 Jun 2022 05:42:54 +0000 (GMT) X-BeenThere: newlib-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Newlib GIT logs List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Jun 2022 05:42:54 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dnewlib-cygwin.git;h=3D112245b78f5= 35e9e735322d42167766856399b48 commit 112245b78f535e9e735322d42167766856399b48 Author: Mark Johnston Date: Tue Sep 21 11:36:55 2021 -0400 cpuset(9): Add CPU_FOREACH_IS(SET|CLR) and modify consumers to use it =20 This implementation is faster and doesn't modify the cpuset, so it lets us avoid some unnecessary copying as well. No functional change intended. =20 Reviewed by: cem, kib, jhb MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D32029 Diff: --- newlib/libc/sys/rtems/include/sys/cpuset.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/newlib/libc/sys/rtems/include/sys/cpuset.h b/newlib/libc/sys/r= tems/include/sys/cpuset.h index a321bddc2..7779f0639 100644 --- a/newlib/libc/sys/rtems/include/sys/cpuset.h +++ b/newlib/libc/sys/rtems/include/sys/cpuset.h @@ -62,6 +62,8 @@ #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_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_T_INITIALIZER BITSET_T_INITIALIZER