Changeset 64189a70 in rtems


Ignore:
Timestamp:
01/28/21 10:29:12 (17 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
450c170
Parents:
dc2a6987
git-author:
Sebastian Huber <sebastian.huber@…> (01/28/21 10:29:12)
git-committer:
Sebastian Huber <sebastian.huber@…> (02/01/21 05:22:20)
Message:

score: Fix _CORE_message_queue_Submit() indentation

This fix relates to a Coverity issue (NESTING_INDENT_MISMATCH).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/score/src/coremsgsubmit.c

    rdc2a6987 r64189a70  
    100100  }
    101101
    102   #if !defined(RTEMS_SCORE_COREMSG_ENABLE_BLOCKING_SEND)
     102#if !defined(RTEMS_SCORE_COREMSG_ENABLE_BLOCKING_SEND)
     103  _CORE_message_queue_Release( the_message_queue, queue_context );
     104  return STATUS_TOO_MANY;
     105#else
     106  /*
     107   *  No message buffers were available so we may need to return an
     108   *  overflow error or block the sender until the message is placed
     109   *  on the queue.
     110   */
     111  if ( !wait ) {
    103112    _CORE_message_queue_Release( the_message_queue, queue_context );
    104113    return STATUS_TOO_MANY;
    105   #else
    106     /*
    107      *  No message buffers were available so we may need to return an
    108      *  overflow error or block the sender until the message is placed
    109      *  on the queue.
    110      */
    111     if ( !wait ) {
    112       _CORE_message_queue_Release( the_message_queue, queue_context );
    113       return STATUS_TOO_MANY;
    114     }
     114  }
    115115
    116     /*
    117      *  Do NOT block on a send if the caller is in an ISR.  It is
    118      *  deadly to block in an ISR.
    119      */
    120     if ( _ISR_Is_in_progress() ) {
    121       _CORE_message_queue_Release( the_message_queue, queue_context );
    122       return STATUS_MESSAGE_QUEUE_WAIT_IN_ISR;
    123     }
     116  /*
     117   *  Do NOT block on a send if the caller is in an ISR.  It is
     118   *  deadly to block in an ISR.
     119   */
     120  if ( _ISR_Is_in_progress() ) {
     121    _CORE_message_queue_Release( the_message_queue, queue_context );
     122    return STATUS_MESSAGE_QUEUE_WAIT_IN_ISR;
     123  }
    124124
    125     /*
    126      *  WARNING!! executing should NOT be used prior to this point.
    127      *  Thus the unusual choice to open a new scope and declare
    128      *  it as a variable.  Doing this emphasizes how dangerous it
    129      *  would be to use this variable prior to here.
    130      */
    131     executing->Wait.return_argument_second.immutable_object = buffer;
    132     executing->Wait.option = (uint32_t) size;
    133     executing->Wait.count = submit_type;
     125  /*
     126   *  WARNING!! executing should NOT be used prior to this point.
     127   *  Thus the unusual choice to open a new scope and declare
     128   *  it as a variable.  Doing this emphasizes how dangerous it
     129   *  would be to use this variable prior to here.
     130   */
     131  executing->Wait.return_argument_second.immutable_object = buffer;
     132  executing->Wait.option = (uint32_t) size;
     133  executing->Wait.count = submit_type;
    134134
    135     _Thread_queue_Context_set_thread_state(
    136       queue_context,
    137       STATES_WAITING_FOR_MESSAGE
    138     );
    139     _Thread_queue_Enqueue(
    140       &the_message_queue->Wait_queue.Queue,
    141       the_message_queue->operations,
    142       executing,
    143       queue_context
    144     );
    145     return _Thread_Wait_get_status( executing );
    146   #endif
     135  _Thread_queue_Context_set_thread_state(
     136    queue_context,
     137    STATES_WAITING_FOR_MESSAGE
     138  );
     139  _Thread_queue_Enqueue(
     140    &the_message_queue->Wait_queue.Queue,
     141    the_message_queue->operations,
     142    executing,
     143    queue_context
     144  );
     145  return _Thread_Wait_get_status( executing );
     146#endif
    147147}
Note: See TracChangeset for help on using the changeset viewer.