* [PATCH v3 1/3] Fix RTEMS CPU_EQUAL_S() @ 2017-06-07 7:34 Sebastian Huber 2017-06-07 7:34 ` [PATCH v3 3/3] Update FreeBSD revision of RTEMS <sys/bitset.h> Sebastian Huber ` (2 more replies) 0 siblings, 3 replies; 5+ messages in thread From: Sebastian Huber @ 2017-06-07 7:34 UTC (permalink / raw) To: newlib According to the FreeBSD man page BIT_CMP() returns true in case the two sets are NOT equal. Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de> --- newlib/libc/sys/rtems/include/sys/cpuset.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/newlib/libc/sys/rtems/include/sys/cpuset.h b/newlib/libc/sys/rtems/include/sys/cpuset.h index 1e09b0275..f928a37c7 100644 --- a/newlib/libc/sys/rtems/include/sys/cpuset.h +++ b/newlib/libc/sys/rtems/include/sys/cpuset.h @@ -202,7 +202,7 @@ static __inline int CPU_COUNT(const cpu_set_t *set) static __inline int CPU_EQUAL_S(size_t setsize, const cpu_set_t *set1, const cpu_set_t *set2) { - return BIT_CMP(_cpu_set_bits(setsize), set1, set2); + return !BIT_CMP(_cpu_set_bits(setsize), set1, set2); } static __inline int CPU_EQUAL(const cpu_set_t *set1, const cpu_set_t *set2) @@ -212,7 +212,7 @@ static __inline int CPU_EQUAL(const cpu_set_t *set1, const cpu_set_t *set2) static __inline int CPU_CMP(const cpu_set_t *set1, const cpu_set_t *set2) { - return CPU_EQUAL(set1, set2); + return BIT_CMP(CPU_SETSIZE, set1, set2); } static __inline int CPU_EMPTY(const cpu_set_t *set) -- 2.12.0 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v3 3/3] Update FreeBSD revision of RTEMS <sys/bitset.h> 2017-06-07 7:34 [PATCH v3 1/3] Fix RTEMS CPU_EQUAL_S() Sebastian Huber @ 2017-06-07 7:34 ` Sebastian Huber 2017-06-07 7:34 ` [PATCH v3 2/3] Fix some RTEMS CPUSET(9) macros Sebastian Huber 2017-06-07 7:35 ` [PATCH v3 1/3] Fix RTEMS CPU_EQUAL_S() Sebastian Huber 2 siblings, 0 replies; 5+ messages in thread From: Sebastian Huber @ 2017-06-07 7:34 UTC (permalink / raw) To: newlib Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de> --- newlib/libc/sys/rtems/include/sys/bitset.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/newlib/libc/sys/rtems/include/sys/bitset.h b/newlib/libc/sys/rtems/include/sys/bitset.h index ac01b8005..ec75223e9 100644 --- a/newlib/libc/sys/rtems/include/sys/bitset.h +++ b/newlib/libc/sys/rtems/include/sys/bitset.h @@ -26,7 +26,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: head/sys/sys/bitset.h 299184 2016-05-06 16:41:23Z royger $ + * $FreeBSD: head/sys/sys/bitset.h 318781 2017-05-24 10:09:54Z kib $ */ #ifndef _SYS_BITSET_H_ -- 2.12.0 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v3 2/3] Fix some RTEMS CPUSET(9) macros 2017-06-07 7:34 [PATCH v3 1/3] Fix RTEMS CPU_EQUAL_S() Sebastian Huber 2017-06-07 7:34 ` [PATCH v3 3/3] Update FreeBSD revision of RTEMS <sys/bitset.h> Sebastian Huber @ 2017-06-07 7:34 ` Sebastian Huber 2017-06-07 7:35 ` [PATCH v3 1/3] Fix RTEMS CPU_EQUAL_S() Sebastian Huber 2 siblings, 0 replies; 5+ messages in thread From: Sebastian Huber @ 2017-06-07 7:34 UTC (permalink / raw) To: newlib Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de> --- newlib/libc/sys/rtems/include/sys/cpuset.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/newlib/libc/sys/rtems/include/sys/cpuset.h b/newlib/libc/sys/rtems/include/sys/cpuset.h index f928a37c7..a850575a1 100644 --- a/newlib/libc/sys/rtems/include/sys/cpuset.h +++ b/newlib/libc/sys/rtems/include/sys/cpuset.h @@ -50,17 +50,17 @@ #define CPUSETBUFSIZ ((2 + sizeof(long) * 2) * _NCPUWORDS) -#define CPU_SETOF(n, p) BIT_SETOF(_cpu_set_bits(setsize), n, p) -#define CPU_ISFULLSET(p) BIT_ISFULLSET(_cpu_set_bits(setsize), p) -#define CPU_SUBSET(p, c) BIT_SUBSET(_cpu_set_bits(setsize), p, c) -#define CPU_OVERLAP(p, c) BIT_OVERLAP(_cpu_set_bits(setsize), p, c) -#define CPU_CLR_ATOMIC(n, p) BIT_CLR_ATOMIC(_cpu_set_bits(setsize), n, p) -#define CPU_SET_ATOMIC(n, p) BIT_SET_ATOMIC(_cpu_set_bits(setsize), n, p) -#define CPU_SET_ATOMIC_ACQ(n, p) BIT_SET_ATOMIC_ACQ(_cpu_set_bits(setsize), n, p) -#define CPU_AND_ATOMIC(n, p) BIT_AND_ATOMIC(_cpu_set_bits(setsize), n, p) -#define CPU_OR_ATOMIC(d, s) BIT_OR_ATOMIC(_cpu_set_bits(setsize), d, s) -#define CPU_COPY_STORE_REL(f, t) BIT_COPY_STORE_REL(_cpu_set_bits(setsize), f, t) -#define CPU_FFS(p) BIT_FFS(_cpu_set_bits(setsize), p) +#define CPU_SETOF(n, p) BIT_SETOF(CPU_SETSIZE, n, p) +#define CPU_ISFULLSET(p) BIT_ISFULLSET(CPU_SETSIZE, p) +#define CPU_SUBSET(p, c) BIT_SUBSET(CPU_SETSIZE, p, c) +#define CPU_OVERLAP(p, c) BIT_OVERLAP(CPU_SETSIZE, p, c) +#define CPU_CLR_ATOMIC(n, p) BIT_CLR_ATOMIC(CPU_SETSIZE, n, p) +#define CPU_SET_ATOMIC(n, p) BIT_SET_ATOMIC(CPU_SETSIZE, n, p) +#define CPU_SET_ATOMIC_ACQ(n, p) BIT_SET_ATOMIC_ACQ(CPU_SETSIZE, n, p) +#define CPU_AND_ATOMIC(n, p) BIT_AND_ATOMIC(CPU_SETSIZE, n, p) +#define CPU_OR_ATOMIC(d, s) BIT_OR_ATOMIC(CPU_SETSIZE, d, s) +#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 CPUSET_FSET BITSET_FSET(_NCPUWORDS) #define CPUSET_T_INITIALIZER BITSET_T_INITIALIZER -- 2.12.0 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v3 1/3] Fix RTEMS CPU_EQUAL_S() 2017-06-07 7:34 [PATCH v3 1/3] Fix RTEMS CPU_EQUAL_S() Sebastian Huber 2017-06-07 7:34 ` [PATCH v3 3/3] Update FreeBSD revision of RTEMS <sys/bitset.h> Sebastian Huber 2017-06-07 7:34 ` [PATCH v3 2/3] Fix some RTEMS CPUSET(9) macros Sebastian Huber @ 2017-06-07 7:35 ` Sebastian Huber 2017-06-07 13:02 ` Corinna Vinschen 2 siblings, 1 reply; 5+ messages in thread From: Sebastian Huber @ 2017-06-07 7:35 UTC (permalink / raw) To: newlib I am really sorry for needing four attempts to get this right. -- Sebastian Huber, embedded brains GmbH Address : Dornierstr. 4, D-82178 Puchheim, Germany Phone : +49 89 189 47 41-16 Fax : +49 89 189 47 41-09 E-Mail : sebastian.huber@embedded-brains.de PGP : Public key available on request. Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v3 1/3] Fix RTEMS CPU_EQUAL_S() 2017-06-07 7:35 ` [PATCH v3 1/3] Fix RTEMS CPU_EQUAL_S() Sebastian Huber @ 2017-06-07 13:02 ` Corinna Vinschen 0 siblings, 0 replies; 5+ messages in thread From: Corinna Vinschen @ 2017-06-07 13:02 UTC (permalink / raw) To: Sebastian Huber; +Cc: newlib [-- Attachment #1: Type: text/plain, Size: 212 bytes --] On Jun 7 09:35, Sebastian Huber wrote: > I am really sorry for needing four attempts to get this right. No worries. Please apply. Thanks, Corinna -- Corinna Vinschen Cygwin Maintainer Red Hat [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 819 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-06-07 13:02 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2017-06-07 7:34 [PATCH v3 1/3] Fix RTEMS CPU_EQUAL_S() Sebastian Huber 2017-06-07 7:34 ` [PATCH v3 3/3] Update FreeBSD revision of RTEMS <sys/bitset.h> Sebastian Huber 2017-06-07 7:34 ` [PATCH v3 2/3] Fix some RTEMS CPUSET(9) macros Sebastian Huber 2017-06-07 7:35 ` [PATCH v3 1/3] Fix RTEMS CPU_EQUAL_S() Sebastian Huber 2017-06-07 13:02 ` Corinna Vinschen
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).