Ignore:
Timestamp:
Feb 11, 2003, 11:29:06 PM (18 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
92e57ea2
Parents:
593904c
Message:

2003-02-11 Joel Sherrill <joel@…>

  • score/cpu_asm.c: Rework logic that decides when to call _Thread_Dispatch. Analysis by Sergei Organov <osv@…> determined that _ISR_Signals_to_thread_executing was not being honored and/or cleared properly.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libcpu/sh/sh7045/score/cpu_asm.c

    r593904c r9518a5b  
    291291  _CPU_ISR_Disable( level );
    292292
     293  _Thread_Dispatch_disable_level--;
     294
    293295  _ISR_Nest_level--;
    294296
     
    300302#endif
    301303
    302   _Thread_Dispatch_disable_level--;
    303 
    304304  _CPU_ISR_Enable( level );
    305305
    306   if ( _Thread_Dispatch_disable_level == 0 )
    307     {
    308       if(( _Context_Switch_necessary) || (! _ISR_Signals_to_thread_executing))
    309         {
    310           _ISR_Signals_to_thread_executing = FALSE;
    311           _Thread_Dispatch();
    312         }
     306  if ( _ISR_Nest_level )
     307    return;
     308
     309  if ( _Thread_Dispatch_disable_level ) {
     310    _ISR_Signals_to_thread_executing = FALSE;
     311    return;
    313312  }
    314 }
     313
     314  if ( _Context_Switch_necessary || _ISR_Signals_to_thread_executing ) {
     315    _ISR_Signals_to_thread_executing = FALSE;
     316    _Thread_Dispatch();
     317  }
     318}
Note: See TracChangeset for help on using the changeset viewer.