Ignore:
Timestamp:
Jan 22, 2008, 9:19:18 PM (12 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.9, master
Children:
9185d61
Parents:
4e1304d
Message:

2008-01-22 Joel Sherrill <joel.sherrill@…>

  • rtems/src/eventsurrender.c, rtems/src/ratemonperiod.c, score/src/threadqdequeue.c, score/src/threadqdequeuefifo.c, score/src/threadqdequeuepriority.c: Fix bugs encountered while testing and clean up more code.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/score/src/threadqdequeue.c

    r4e1304d r11c16a64  
    4949{
    5050  Thread_Control *(*dequeue_p)( Thread_queue_Control * );
     51  Thread_Control *the_thread;
     52  ISR_Level       level;
     53  Thread_blocking_operation_States  sync_state;
    5154
    5255  if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY )
     
    5558    dequeue_p = _Thread_queue_Dequeue_fifo;
    5659
    57   return (*dequeue_p)( the_thread_queue );
     60  the_thread = (*dequeue_p)( the_thread_queue );
     61  _ISR_Disable( level );
     62    if ( !the_thread ) {
     63      sync_state = the_thread_queue->sync_state;
     64      if ( (sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
     65           (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) {
     66        the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SATISFIED;
     67        the_thread = _Thread_Executing;
     68      }
     69    }
     70  _ISR_Enable( level );
     71  return the_thread;
    5872}
Note: See TracChangeset for help on using the changeset viewer.