[RTEMS Project] #3032: CPU_NAND_S() implementation is not in line with FreeBSD

RTEMS trac trac at rtems.org
Wed Jun 7 06:47:21 UTC 2017


#3032: CPU_NAND_S() implementation is not in line with FreeBSD
-----------------------------+-----------------------------
 Reporter:  Sebastian Huber  |      Owner:  Sebastian Huber
     Type:  defect           |     Status:  assigned
 Priority:  normal           |  Milestone:  4.12.0
Component:  SMP              |    Version:  4.11
 Severity:  blocker          |   Keywords:
-----------------------------+-----------------------------
 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]);
 }
 }}}

--
Ticket URL: <http://devel.rtems.org/ticket/3032>
RTEMS Project <http://www.rtems.org/>
RTEMS Project


More information about the bugs mailing list