[PATCH 7/8] rtems: Remove Message_queue_Control::attribute_set

Sebastian Huber sebastian.huber at embedded-brains.de
Fri Sep 25 16:18:20 UTC 2020


On 25/09/2020 17:42, Joel Sherrill wrote:

>     diff --git a/cpukit/libmisc/monitor/mon-queue.c
>     b/cpukit/libmisc/monitor/mon-queue.c
>     index 9430797c6c..aadfcd3989 100644
>     --- a/cpukit/libmisc/monitor/mon-queue.c
>     +++ b/cpukit/libmisc/monitor/mon-queue.c
>     @@ -16,7 +16,21 @@ rtems_monitor_queue_canonical(
>      {
>          const Message_queue_Control *rtems_queue = (const
>     Message_queue_Control *) queue_void;
>
>     -    canonical_queue->attributes = rtems_queue->attribute_set;
>     +    canonical_queue->attributes = 0;
>     +
>     +    if (
>     +      rtems_queue->message_queue.operations
>     +        == &_Thread_queue_Operations_priority
>     +    ) {
>
>
> Why the odd formatting on this? I would think it should be:
>    if ( rtems_queue->message_queue.operations ==
>           &_Thread_queue_Operations_priority ) {
With this style it is not really clear what belongs to the condition and 
what to the next code block. The ") {" in a separate line makes this 
more clear.

I used this style all over the place for a couple of years. 
Unfortunately, this area is not covered by the coding conventions:

https://docs.rtems.org/branches/master/eng/coding-conventions.html#formatting



More information about the devel mailing list