Changeset 11c16a64 in rtems


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.
Location:
cpukit
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • cpukit/ChangeLog

    r4e1304d r11c16a64  
     12008-01-22      Joel Sherrill <joel.sherrill@OARcorp.com>
     2
     3        * rtems/src/eventsurrender.c, rtems/src/ratemonperiod.c,
     4        score/src/threadqdequeue.c, score/src/threadqdequeuefifo.c,
     5        score/src/threadqdequeuepriority.c: Fix bugs encountered while
     6        testing and clean up more code.
     7
    182008-01-22      Joel Sherrill <joel.sherrill@oarcorp.com>
    29
  • cpukit/rtems/src/eventsurrender.c

    r4e1304d r11c16a64  
    6767   *  No events were seized in this operation
    6868   */
    69   if ( _Event_sets_Is_empty( seized_events ) )
     69  if ( _Event_sets_Is_empty( seized_events ) ) {
     70    _ISR_Enable( level );
    7071    return;
     72  }
    7173
    7274  /*
  • cpukit/rtems/src/ratemonperiod.c

    r4e1304d r11c16a64  
    198198            break;
    199199          case RATE_MONOTONIC_EXPIRED:
     200          case RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING:
    200201            return_value = RTEMS_TIMEOUT;
    201202            break;
  • 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}
  • cpukit/score/src/threadqdequeuefifo.c

    r4e1304d r11c16a64  
    7575  }
    7676
    77   switch ( the_thread_queue->sync_state ) {
    78     case THREAD_BLOCKING_OPERATION_SYNCHRONIZED:
    79     case THREAD_BLOCKING_OPERATION_SATISFIED:
    80       _ISR_Enable( level );
    81       return NULL;
    82 
    83     case THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED:
    84     case THREAD_BLOCKING_OPERATION_TIMEOUT:
    85       the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SATISFIED;
    86       _ISR_Enable( level );
    87       return _Thread_Executing;
    88   }
    89   return NULL;                /* this is only to prevent warnings */
     77  _ISR_Enable( level );
     78  return NULL;
    9079}
  • cpukit/score/src/threadqdequeuepriority.c

    r4e1304d r11c16a64  
    5656  Chain_Node     *next_node;
    5757  Chain_Node     *previous_node;
    58   Thread_blocking_operation_States sync;
    5958
    6059  _ISR_Disable( level );
     
    7069
    7170  /*
    72    * If we interrupted a blocking operation, cancel it.
     71   * We did not find a thread to unblock.
    7372   */
    74   sync = the_thread_queue->sync_state;
    75   if ( (sync == THREAD_BLOCKING_OPERATION_SYNCHRONIZED) ||
    76        (sync == THREAD_BLOCKING_OPERATION_SATISFIED) ) {
    77     _ISR_Enable( level );
    78     return NULL;
    79   }
    80 
    81   if ( (sync == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ||
    82        (sync == THREAD_BLOCKING_OPERATION_TIMEOUT ) ) {
    83     the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SATISFIED;
    84     _ISR_Enable( level );
    85     return _Thread_Executing;
    86   }
     73  _ISR_Enable( level );
     74  return NULL;
    8775
    8876dequeue:
Note: See TracChangeset for help on using the changeset viewer.