Changeset 9a93d54 in rtems


Ignore:
Timestamp:
Feb 26, 2004, 5:04:27 PM (16 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Children:
1a17efb
Parents:
70e27c2
Message:

2004-02-26 Thomas Rauscher <trauscher@….

PR 584/RTEMS

  • src/eventtimeout.c: Fix critical section window.
Location:
cpukit/rtems
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpukit/rtems/ChangeLog

    r70e27c2 r9a93d54  
     12004-02-26      Thomas Rauscher <trauscher@loytec.com.
     2
     3        PR 584/RTEMS
     4        * src/eventtimeout.c: Fix critical section window.
     5
    162003-10-22      Joel Sherrill <joel@OARcorp.com>
    27
  • cpukit/rtems/src/eventtimeout.c

    r70e27c2 r9a93d54  
    4040)
    4141{
    42   Thread_Control *the_thread;
    43   Objects_Locations      location;
     42  Thread_Control    *the_thread;
     43  Objects_Locations  location;
     44  ISR_Level          level;
    4445
    4546  the_thread = _Thread_Get( id, &location );
     
    6263       */
    6364
    64       if ( _Event_Sync_state != EVENT_SYNC_SYNCHRONIZED &&
    65            _Thread_Is_executing( the_thread ) ) {
    66         if ( _Event_Sync_state != EVENT_SYNC_SATISFIED )
    67           _Event_Sync_state = EVENT_SYNC_TIMEOUT;
    68       } else {
    69         the_thread->Wait.return_code = RTEMS_TIMEOUT;
    70         _Thread_Unblock( the_thread );
     65      _ISR_Disable( level );
     66      if ( the_thread->Wait.count ) {  /* verify thread is waiting */
     67        the_thread->Wait.count = 0;
     68        if ( _Event_Sync_state != EVENT_SYNC_SYNCHRONIZED &&
     69             _Thread_Is_executing( the_thread ) ) {
     70          if ( _Event_Sync_state != EVENT_SYNC_SATISFIED ) {
     71            _Event_Sync_state = EVENT_SYNC_TIMEOUT;
     72            }
     73          _ISR_Enable( level );
     74        } else {
     75            the_thread->Wait.return_code = RTEMS_TIMEOUT;
     76            _ISR_Enable( level );
     77            _Thread_Unblock( the_thread );
     78        }
    7179      }
     80      else {
     81        _ISR_Enable( level );
     82      }
     83
    7284      _Thread_Unnest_dispatch();
    7385      break;
Note: See TracChangeset for help on using the changeset viewer.