summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2017-06-07 08:38:22 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2017-06-07 15:46:19 +0200
commitc29f5b219d450d68d38feb20990ae18c7945f035 (patch)
treefd5d2173f1f57d4cf9706d9c47fb814939356933
parentffcaf32108f1e7fd8f6b2b180f14fcf553c977bf (diff)
downloadcygnal-c29f5b219d450d68d38feb20990ae18c7945f035.tar.gz
cygnal-c29f5b219d450d68d38feb20990ae18c7945f035.tar.bz2
cygnal-c29f5b219d450d68d38feb20990ae18c7945f035.zip
Fix RTEMS CPU_EQUAL_S()
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>
-rw-r--r--newlib/libc/sys/rtems/include/sys/cpuset.h4
1 files 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)