Changeset 45d406f8 in rtems


Ignore:
Timestamp:
May 10, 2007, 6:47:35 PM (13 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
dfc6f3dc
Parents:
a32835a3
Message:

2007-05-10 Joel Sherrill <joel.sherrill@…>

PR 1241/rtems

  • score/src/threadchangepriority.c, score/src/threadqrequeue.c: Close critical section window added with requeueing support.
Location:
cpukit
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • cpukit/ChangeLog

    ra32835a3 r45d406f8  
     12007-05-10      Joel Sherrill <joel.sherrill@OARcorp.com>
     2
     3        PR 1241/rtems
     4        * score/src/threadchangepriority.c, score/src/threadqrequeue.c: Close
     5        critical section window added with requeueing support.
     6
    172007-05-10      Ralf Corsépius <ralf.corsepius@rtems.org>
    28
  • cpukit/score/src/threadchangepriority.c

    ra32835a3 r45d406f8  
    9696  state = the_thread->current_state;
    9797  if ( state != STATES_TRANSIENT ) {
    98     if ( _States_Is_waiting_on_thread_queue( state ) ) {
    99        _ISR_Enable( level );
    100       _Thread_queue_Requeue( the_thread->Wait.queue, the_thread );
    101       _ISR_Disable( level );  /* redisable so state is cleared with ISR off */
    102     }
    10398    the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
    10499    _ISR_Enable( level );
     100    if ( _States_Is_waiting_on_thread_queue( state ) ) {
     101      _Thread_queue_Requeue( the_thread->Wait.queue, the_thread );
     102    }
    105103    return;
    106104  }
  • cpukit/score/src/threadqrequeue.c

    ra32835a3 r45d406f8  
    4848{
    4949  /* just in case the thread really wasn't blocked here */
    50   if ( !the_thread_queue )
     50  if ( !the_thread_queue ) {
    5151    return;
     52  }
    5253
    5354  switch ( the_thread_queue->discipline ) {
     
    5758    case THREAD_QUEUE_DISCIPLINE_PRIORITY: {
    5859      Thread_queue_Control *tq = the_thread_queue;
     60      ISR_Level             level;
    5961
    60       _Thread_queue_Enter_critical_section( tq );
     62      _ISR_Disable( level );
     63      if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
     64        _Thread_queue_Enter_critical_section( tq );
    6165        _Thread_queue_Extract_priority_helper( tq, the_thread, TRUE );
    6266        _Thread_queue_Enqueue_priority( tq, the_thread );
    6367      }
     68      _ISR_Enable( level );
    6469      break;
    65    }
     70    }
     71  }
    6672}
    6773
Note: See TracChangeset for help on using the changeset viewer.