[PATCH] score: Fix priority message queue insert
Sebastian Huber
sebastian.huber at embedded-brains.de
Wed Apr 22 19:51:28 UTC 2015
----- Gedare Bloom <gedare at rtems.org> schrieb:
> Joel,
>
> On Tue, Apr 21, 2015 at 12:13 PM, Joel Sherrill
> <joel.sherrill at 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.
More information about the devel
mailing list