Changeset a26603d in rtems


Ignore:
Timestamp:
Dec 1, 1995, 9:06:53 PM (24 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
4250c8b
Parents:
3837215d
Message:

Changed code for exit from synchronization state to a switch on the
possible synchronization actions. This should have made it harder to
avoid a case.

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • c/src/exec/rtems/src/event.c

    r3837215d ra26603d  
    197197
    198198  _ISR_Disable( level );
    199   if ( _Event_Sync == TRUE ) {
    200     _Event_Sync = FALSE;
    201     _ISR_Enable( level );
    202     return;
    203   }
    204   if ( _Event_Sync_state == EVENT_SYNC_TIMEOUT )
    205     executing->Wait.return_code = RTEMS_TIMEOUT;
    206   _ISR_Enable( level );
    207   if ( ticks )
    208     (void) _Watchdog_Remove( &executing->Timer );
    209   _Thread_Unblock( executing );
    210   return;
     199  switch ( _Event_Sync_state ) {
     200    case EVENT_SYNC_NOTHING_HAPPENED:
     201      _Event_Sync = FALSE;
     202      _ISR_Enable( level );
     203      return;
     204    case EVENT_SYNC_TIMEOUT:
     205      executing->Wait.return_code = RTEMS_TIMEOUT;
     206      _ISR_Enable( level );
     207      _Thread_Unblock( executing );
     208      return;
     209    case EVENT_SYNC_SATISFIED:
     210      if ( _Watchdog_Is_active( &executing->Timer ) ) {
     211        _Watchdog_Deactivate( &executing->Timer );
     212        _ISR_Enable( level );
     213        (void) _Watchdog_Remove( &executing->Timer );
     214      } else
     215        _ISR_Enable( level );
     216      _Thread_Unblock( executing );
     217      return;
     218  }
    211219}
    212220
  • cpukit/rtems/src/event.c

    r3837215d ra26603d  
    197197
    198198  _ISR_Disable( level );
    199   if ( _Event_Sync == TRUE ) {
    200     _Event_Sync = FALSE;
    201     _ISR_Enable( level );
    202     return;
    203   }
    204   if ( _Event_Sync_state == EVENT_SYNC_TIMEOUT )
    205     executing->Wait.return_code = RTEMS_TIMEOUT;
    206   _ISR_Enable( level );
    207   if ( ticks )
    208     (void) _Watchdog_Remove( &executing->Timer );
    209   _Thread_Unblock( executing );
    210   return;
     199  switch ( _Event_Sync_state ) {
     200    case EVENT_SYNC_NOTHING_HAPPENED:
     201      _Event_Sync = FALSE;
     202      _ISR_Enable( level );
     203      return;
     204    case EVENT_SYNC_TIMEOUT:
     205      executing->Wait.return_code = RTEMS_TIMEOUT;
     206      _ISR_Enable( level );
     207      _Thread_Unblock( executing );
     208      return;
     209    case EVENT_SYNC_SATISFIED:
     210      if ( _Watchdog_Is_active( &executing->Timer ) ) {
     211        _Watchdog_Deactivate( &executing->Timer );
     212        _ISR_Enable( level );
     213        (void) _Watchdog_Remove( &executing->Timer );
     214      } else
     215        _ISR_Enable( level );
     216      _Thread_Unblock( executing );
     217      return;
     218  }
    211219}
    212220
Note: See TracChangeset for help on using the changeset viewer.