----- Gedare Bloom <ged...@rtems.org> schrieb: > Joel, > > On Tue, Apr 21, 2015 at 12:13 PM, Joel Sherrill > <joel.sherr...@oarcorp.com> wrote: > > > > > > On 4/21/2015 2:24 AM, Sebastian Huber wrote: > >> Move the linear search into a critical section to avoid corruption due > >> to higher priority interrupts. The interrupt disable time depends now > >> on the count of pending messages. > >> > >> Close #2328. > >> --- > >> cpukit/score/include/rtems/score/coremsgimpl.h | 32 +------ > >> cpukit/score/src/coremsginsert.c | 113 > >> +++++++++++-------------- > >> 2 files changed, 50 insertions(+), 95 deletions(-) > > >> +#if defined(RTEMS_SCORE_COREMSG_ENABLE_NOTIFICATION) > >> + notify = the_message_queue->number_of_pending_messages == 0; > >> +#endif > > Add parentheses around expression to make it clear that is the intent. > Our coding conventions say to avoid unnecessary parens. If you'd like > to make some adjustment to the conventions please start a separate > thread.
Ok, I tried to figure out if a x = ( y = 0 ); triggers a warning which I thought was the reason for Joel to suggest them. It doesn't. So these parentheses are quite useless. The testsuite would catch an accidential: notify = the_message_queue->number_of_pending_messages = 0; -- Sebastian Huber, embedded brains GmbH Address : Dornierstr. 4, D-82178 Puchheim, Germany Phone : +49 89 189 47 41-16 Fax : +49 89 189 47 41-09 E-Mail : sebastian.huber at embedded-brains.de PGP : Public key available on request. Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG. _______________________________________________ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel