Changeset 1350a702 in rtems


Ignore:
Timestamp:
Nov 22, 2013, 9:53:17 AM (6 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
ea3e6928
Parents:
96962b5
git-author:
Sebastian Huber <sebastian.huber@…> (11/22/13 09:53:17)
git-committer:
Sebastian Huber <sebastian.huber@…> (11/26/13 09:02:08)
Message:

score: Format changes in _Thread_Set_state()

File:
1 edited

Legend:

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

    r96962b5 r1350a702  
    3232{
    3333  ISR_Level      level;
     34  States_Control current_state;
    3435
    3536  _ISR_Disable( level );
    36   if ( !_States_Is_ready( the_thread->current_state ) ) {
    37     the_thread->current_state =
    38        _States_Set( state, the_thread->current_state );
    39     _ISR_Enable( level );
    40     return;
     37
     38  current_state = the_thread->current_state;
     39  if ( _States_Is_ready( current_state ) ) {
     40    the_thread->current_state = state;
     41
     42    _Scheduler_Block( the_thread );
     43  } else {
     44    the_thread->current_state = _States_Set( state, current_state);
    4145  }
    42 
    43   the_thread->current_state = state;
    44 
    45   _Scheduler_Block( the_thread );
    4646
    4747  _ISR_Enable( level );
Note: See TracChangeset for help on using the changeset viewer.