Ticket #584: evtimeout.diff
File evtimeout.diff, 1.7 KB (added by Joel Sherrill, on 12/03/06 at 13:31:13) |
---|
-
cpukit/rtems/src/eventtimeout.c
RCS file: /usr1/CVS/rtems/cpukit/rtems/src/eventtimeout.c,v retrieving revision 1.2.6.1 diff -u -r1.2.6.1 eventtimeout.c
39 39 void *ignored 40 40 ) 41 41 { 42 Thread_Control *the_thread; 43 Objects_Locations location; 42 Thread_Control *the_thread; 43 Objects_Locations location; 44 ISR_Level level; 44 45 45 46 the_thread = _Thread_Get( id, &location ); 46 47 switch ( location ) { … … 61 62 * a timeout is not allowed to occur. 62 63 */ 63 64 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 } 71 79 } 80 else { 81 _ISR_Enable( level ); 82 } 83 72 84 _Thread_Unnest_dispatch(); 73 85 break; 74 86 }