Changeset 3aad9d9b in rtems


Ignore:
Timestamp:
Sep 3, 2018, 7:31:19 AM (9 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
e0a9336b
Parents:
fad3f79b
git-author:
Sebastian Huber <sebastian.huber@…> (09/03/18 07:31:19)
git-committer:
Sebastian Huber <sebastian.huber@…> (09/03/18 07:37:31)
Message:

score: Generalize SMP scheduler block support

Add extract from scheduled function to the _Scheduler_SMP_Block()
operation. This allows a scheduler implementation to do extra work in
case a scheduled node is blocked.

Location:
cpukit
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • cpukit/include/rtems/score/schedulersmpimpl.h

    rfad3f79b r3aad9d9b  
    868868
    869869static inline void _Scheduler_SMP_Extract_from_scheduled(
    870   Scheduler_Node *node
    871 )
    872 {
     870  Scheduler_Context *context,
     871  Scheduler_Node    *node
     872)
     873{
     874  (void) context;
    873875  _Chain_Extract_unprotected( &node->Node.Chain );
    874876}
     
    969971 * @param[in] thread The thread of the scheduling operation.
    970972 * @param[in] node The scheduler node of the thread to block.
     973 * @param[in] extract_from_scheduled Function to extract a node from the set of
     974 *   scheduled nodes.
    971975 * @param[in] extract_from_ready Function to extract a node from the set of
    972976 *   ready nodes.
     
    979983  Thread_Control                   *thread,
    980984  Scheduler_Node                   *node,
     985  Scheduler_SMP_Extract             extract_from_scheduled,
    981986  Scheduler_SMP_Extract             extract_from_ready,
    982987  Scheduler_SMP_Get_highest_ready   get_highest_ready,
     
    10021007
    10031008    if ( node_state == SCHEDULER_SMP_NODE_SCHEDULED ) {
    1004       _Scheduler_SMP_Extract_from_scheduled( node );
     1009      ( *extract_from_scheduled )( context, node );
    10051010      _Scheduler_SMP_Schedule_highest_ready(
    10061011        context,
     
    10971102
    10981103  if ( node_state == SCHEDULER_SMP_NODE_SCHEDULED ) {
    1099     _Scheduler_SMP_Extract_from_scheduled( node );
     1104    _Scheduler_SMP_Extract_from_scheduled( context, node );
    11001105    ( *update )( context, node, priority );
    11011106    ( *enqueue_scheduled )( context, node, insert_priority );
     
    11311136
    11321137  if ( node_state == SCHEDULER_SMP_NODE_SCHEDULED ) {
    1133     _Scheduler_SMP_Extract_from_scheduled( node );
     1138    _Scheduler_SMP_Extract_from_scheduled( context, node );
    11341139    ( *enqueue_scheduled )( context, node, insert_priority );
    11351140    needs_help = false;
     
    13001305    _Thread_Scheduler_release_critical( thread, &lock_context );
    13011306
    1302     _Scheduler_SMP_Extract_from_scheduled( node );
     1307    _Scheduler_SMP_Extract_from_scheduled( context, node );
    13031308    _Scheduler_SMP_Schedule_highest_ready(
    13041309      context,
     
    13941399  } while ( _Thread_Get_CPU( victim_user ) != cpu );
    13951400
    1396   _Scheduler_SMP_Extract_from_scheduled( victim_node );
     1401  _Scheduler_SMP_Extract_from_scheduled( context, victim_node );
    13971402  victim_owner = _Scheduler_Node_get_owner( victim_node );
    13981403
     
    14531458
    14541459  if ( node_state == SCHEDULER_SMP_NODE_SCHEDULED ) {
    1455     _Scheduler_SMP_Extract_from_scheduled( node );
     1460    _Scheduler_SMP_Extract_from_scheduled( context, node );
    14561461    _Scheduler_SMP_Preempt_and_schedule_highest_ready(
    14571462      context,
  • cpukit/score/src/scheduleredfsmp.c

    rfad3f79b r3aad9d9b  
    312312  Priority_Control insert_priority;
    313313
    314   _Chain_Extract_unprotected( &scheduled_to_ready->Node.Chain );
     314  _Scheduler_SMP_Extract_from_scheduled( context, scheduled_to_ready );
    315315  insert_priority = _Scheduler_SMP_Node_priority( scheduled_to_ready );
    316316  _Scheduler_EDF_SMP_Insert_ready(
     
    404404    thread,
    405405    node,
     406    _Scheduler_SMP_Extract_from_scheduled,
    406407    _Scheduler_EDF_SMP_Extract_from_ready,
    407408    _Scheduler_EDF_SMP_Get_highest_ready,
  • cpukit/score/src/schedulerpriorityaffinitysmp.c

    rfad3f79b r3aad9d9b  
    175175    thread,
    176176    node,
     177    _Scheduler_SMP_Extract_from_scheduled,
    177178    _Scheduler_priority_SMP_Extract_from_ready,
    178179    _Scheduler_priority_affinity_SMP_Get_highest_ready,
  • cpukit/score/src/schedulerprioritysmp.c

    rfad3f79b r3aad9d9b  
    103103    thread,
    104104    node,
     105    _Scheduler_SMP_Extract_from_scheduled,
    105106    _Scheduler_priority_SMP_Extract_from_ready,
    106107    _Scheduler_priority_SMP_Get_highest_ready,
  • cpukit/score/src/schedulersimplesmp.c

    rfad3f79b r3aad9d9b  
    175175    thread,
    176176    node,
     177    _Scheduler_SMP_Extract_from_scheduled,
    177178    _Scheduler_simple_SMP_Extract_from_ready,
    178179    _Scheduler_simple_SMP_Get_highest_ready,
  • cpukit/score/src/schedulerstrongapa.c

    rfad3f79b r3aad9d9b  
    235235    the_thread,
    236236    node,
     237    _Scheduler_SMP_Extract_from_scheduled,
    237238    _Scheduler_strong_APA_Extract_from_ready,
    238239    _Scheduler_strong_APA_Get_highest_ready,
Note: See TracChangeset for help on using the changeset viewer.