public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
From: Sebastian Huber <sebastian.huber@embedded-brains.de>
To: newlib@sourceware.org
Subject: [PATCH v2 1/3] Fix RTEMS CPU_EQUAL_S()
Date: Wed, 07 Jun 2017 07:19:00 -0000	[thread overview]
Message-ID: <20170607071921.5579-1-sebastian.huber@embedded-brains.de> (raw)

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..4c111347e 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

             reply	other threads:[~2017-06-07  7:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-07  7:19 Sebastian Huber [this message]
2017-06-07  7:19 ` [PATCH v2 3/3] Update FreeBSD revision of RTEMS <sys/bitset.h> Sebastian Huber
2017-06-07  7:19 ` [PATCH v2 2/3] Fix some RTEMS CPUSET(9) macros Sebastian Huber

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170607071921.5579-1-sebastian.huber@embedded-brains.de \
    --to=sebastian.huber@embedded-brains.de \
    --cc=newlib@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).