Changeset 4b45c13 in rtems


Ignore:
Timestamp:
Jul 21, 2009, 11:09:07 PM (10 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, master
Children:
12a191ae
Parents:
7fbe4fa1
Message:

2009-07-21 Joel Sherrill <joel.sherrill@…>

  • rtems/src/eventseize.c, rtems/src/eventsurrender.c, rtems/src/eventtimeout.c: Clean up and minor rework as a side-effect of coverage analysis.
Location:
cpukit
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • cpukit/ChangeLog

    r7fbe4fa1 r4b45c13  
     12009-07-21      Joel Sherrill <joel.sherrill@OARcorp.com>
     2
     3        * rtems/src/eventseize.c, rtems/src/eventsurrender.c,
     4        rtems/src/eventtimeout.c: Clean up and minor rework as a side-effect
     5        of coverage analysis.
     6
    172009-07-21      Joel Sherrill <joel.sherrill@OARcorp.com>
    28
  • cpukit/rtems/src/eventseize.c

    r7fbe4fa1 r4b45c13  
    8787  }
    8888
    89   _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
    90 
     89  /*
     90   *  Note what we are waiting for BEFORE we enter the critical section.
     91   *  The interrupt critical section management code needs this to be
     92   *  set properly when we are marked as in the event critical section.
     93   *
     94   *  NOTE: Since interrupts are disabled, this isn't that much of an
     95   *        issue but better safe than sorry.
     96   */
    9197  executing->Wait.option            = (uint32_t) option_set;
    9298  executing->Wait.count             = (uint32_t) event_in;
    9399  executing->Wait.return_argument   = event_out;
     100
     101  _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
    94102
    95103  _ISR_Enable( level );
  • cpukit/rtems/src/eventsurrender.c

    r7fbe4fa1 r4b45c13  
    7878  if ( _ISR_Is_in_progress() &&
    7979       _Thread_Is_executing( the_thread ) &&
    80        ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ||
    81         (_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT)) ) {
     80       ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
     81        (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
    8282    if ( seized_events == event_condition || _Options_Is_any(option_set) ) {
    8383      api->pending_events = _Event_sets_Clear( pending_events,seized_events );
  • cpukit/rtems/src/eventtimeout.c

    r7fbe4fa1 r4b45c13  
    6464       *  a timeout is not allowed to occur.
    6565       */
    66 
    67 
    6866      _ISR_Disable( level );
    69         if ( !the_thread->Wait.count ) {  /* verify thread is waiting */
    70           _Thread_Unnest_dispatch();
    71           _ISR_Enable( level );
    72           return;
    73         }
     67        #if defined(RTEMS_DEBUG)
     68          if ( !the_thread->Wait.count ) {  /* verify thread is waiting */
     69            _Thread_Unnest_dispatch();
     70            _ISR_Enable( level );
     71            return;
     72          }
     73        #endif
    7474
    7575        the_thread->Wait.count = 0;
    7676        if ( _Thread_Is_executing( the_thread ) ) {
    77           Thread_blocking_operation_States sync = _Event_Sync_state;
    78           if ( (sync == THREAD_BLOCKING_OPERATION_SYNCHRONIZED) ||
    79                (sync == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) {
     77          if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
    8078            _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
    81           }
    8279        }
    8380
Note: See TracChangeset for help on using the changeset viewer.