#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:
Blocking:

Description

According to the FreeBSD man page we have:

https://www.freebsd.org/cgi/man.cgi?query=cpuset&sektion=9&apropos=0&manpath=FreeBSD+11.0-RELEASE+and+Ports

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 06/07/17 at 13:30:00 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 10/10/17 at 06:25:41 by Sebastian Huber

Component: SMPtool/newlib

comment:3 Changed on 11/09/17 at 06:27:14 by Sebastian Huber

Milestone: 4.12.05.1

Milestone renamed

Note: See TracTickets for help on using tickets.