Changeset f4548e9 in rtems


Ignore:
Timestamp:
Feb 26, 2004, 5:04:44 PM (16 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
f4fe0e9a
Parents:
54a43fe4
Message:

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

PR 584/RTEMS

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

Legend:

Unmodified
Added
Removed
  • cpukit/ChangeLog

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

    r54a43fe4 rf4548e9  
    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.