Changeset 3a5dbdc in rtems for c/src/exec/score/src/threadmp.c


Ignore:
Timestamp:
Jul 31, 1995, 10:22:38 PM (26 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
4a6e64d
Parents:
0ea07c0
Message:

Switched to events for mp receive server and eliminated the special
blocking mechanism for it.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/exec/score/src/threadmp.c

    r0ea07c0 r3a5dbdc  
    158158  return NULL;
    159159}
    160 
    161 /*PAGE
    162  *
    163  *  _Thread_MP_Block
    164  *
    165  */
    166 
    167 void _Thread_MP_Block( void )
    168 {
    169   ISR_Level   level;
    170 
    171   _ISR_Disable( level );
    172 
    173     if ( _Thread_MP_Receive->Notepads[ 0 ] != 0 ) {
    174       _Priority_Remove_from_bit_map( &_Thread_MP_Receive->Priority_map );
    175 
    176       _Thread_MP_Receive->current_state = STATES_SUSPENDED;
    177 
    178       _ISR_Flash( level );
    179 
    180       _Thread_Calculate_heir();
    181 
    182       _Context_Switch_necessary = TRUE;
    183 
    184       _ISR_Enable( level );
    185 
    186       _Thread_Dispatch_disable_level = 0;
    187 
    188       _Thread_Dispatch();
    189 
    190       return;
    191 
    192     }
    193   _ISR_Enable( level );
    194 
    195 }
    196 
    197 /*PAGE
    198  *
    199  *  _Thread_MP_Ready
    200  *
    201  */
    202 
    203 void _Thread_MP_Ready( void )
    204 {
    205   ISR_Level   level;
    206 
    207   _ISR_Disable( level );
    208 
    209     if ( _States_Is_suspended( _Thread_MP_Receive->current_state ) ) {
    210       _Priority_Add_to_bit_map( &_Thread_MP_Receive->Priority_map );
    211 
    212       _Thread_MP_Receive->current_state = STATES_READY;
    213 
    214       _Thread_Heir = _Thread_MP_Receive;
    215 
    216       _Context_Switch_necessary = TRUE;
    217 
    218       _ISR_Enable( level );
    219 
    220       if ( _Thread_Is_dispatching_enabled() )
    221         _Thread_Dispatch();
    222 
    223     } else {
    224 
    225       _Thread_MP_Receive->Notepads[ 0 ] = 0;
    226       _ISR_Enable( level );
    227 
    228     }
    229 }
Note: See TracChangeset for help on using the changeset viewer.