#3032 closed defect (fixed)

CPU_NAND_S() implementation is not in line with FreeBSD

Reported by: Sebastian Huber Owned by: Sebastian Huber
Priority: normal Milestone: 5.1
Component: tool/newlib Version: 4.11
Severity: blocker Keywords:
Cc: Blocked By:


According to the FreeBSD man page we have:


The CPU_NAND() macro removes CPUs in src from dst. (It is the cpuset(9) equivalent of the scalar: dst &= ~ src.)

However, in Newlib we had:

static __inline void CPU_NAND_S(size_t setsize, cpu_set_t *destset,
  const cpu_set_t *srcset1, const cpu_set_t *srcset2)
  cpu_set_word_t *wdest = &destset->__bits[0];
  const cpu_set_word_t *wsrc1 = &srcset1->__bits[0];
  const cpu_set_word_t *wsrc2 = &srcset2->__bits[0];
  size_t n = setsize / sizeof(*wdest);
  size_t i;

  for (i = 0; i < n; ++i)
    wdest[i] = ~(wsrc1[i] & wsrc2[i]);

Change History (3)

comment:1 Changed on Jun 7, 2017 at 1:30:00 PM by Sebastian Huber <sebastian.huber@…>

Resolution: fixed
Status: assignedclosed

In b06dbb26/rtems:

spcpuset01: Update due to CPU_NAND_S() changes

Close #3032.

comment:2 Changed on Oct 10, 2017 at 6:25:41 AM by Sebastian Huber

Component: SMPtool/newlib

comment:3 Changed on Nov 9, 2017 at 6:27:14 AM by Sebastian Huber


Milestone renamed

Note: See TracTickets for help on using tickets.