Changeset 7f742432 in rtems


Ignore:
Timestamp:
Oct 31, 2016, 7:22:02 AM (4 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
5, master
Children:
2dd098a
Parents:
c0f1f52
git-author:
Sebastian Huber <sebastian.huber@…> (10/31/16 07:22:02)
git-committer:
Sebastian Huber <sebastian.huber@…> (11/02/16 09:05:45)
Message:

score: Delete Thread_Scheduler_control::own_node

Update #2556.

Location:
cpukit/score
Files:
12 edited

Legend:

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

    rc0f1f52 r7f742432  
    281281{
    282282  ISR_lock_Context  lock_context;
    283   Scheduler_Node   *own_node;
     283  Scheduler_Node   *scheduler_node;
    284284  Per_CPU_Control  *cpu_self;
    285285
     
    287287  _Thread_Wait_acquire_default_critical( owner, &lock_context );
    288288
    289   own_node = _Thread_Scheduler_get_own_node( owner );
     289  scheduler_node = _Thread_Scheduler_get_home_node( owner );
    290290
    291291  if (
    292     own_node->Wait.Priority.Node.priority
     292    _Priority_Get_priority( &scheduler_node->Wait.Priority )
    293293      < the_mutex->Priority_ceiling.priority
    294294  ) {
  • cpukit/score/include/rtems/score/mrspimpl.h

    rc0f1f52 r7f742432  
    101101  const Scheduler_Control *scheduler;
    102102  Priority_Control         ceiling_priority;
    103   Scheduler_Node          *own_node;
     103  Scheduler_Node          *scheduler_node;
    104104
    105105  _Thread_queue_Context_clear_priority_updates( queue_context );
     
    107107
    108108  scheduler = _Scheduler_Get_own( thread );
    109   own_node = _Thread_Scheduler_get_own_node( thread );
     109  scheduler_node = _Thread_Scheduler_get_home_node( thread );
    110110  ceiling_priority = _MRSP_Get_priority( mrsp, scheduler );
    111111
    112   if ( ceiling_priority <= own_node->Wait.Priority.Node.priority ) {
     112  if (
     113    ceiling_priority
     114      <= _Priority_Get_priority( &scheduler_node->Wait.Priority )
     115  ) {
    113116    _Priority_Node_initialize( priority_node, ceiling_priority );
    114117    _Thread_Priority_add( thread, priority_node, queue_context );
  • cpukit/score/include/rtems/score/schedulerimpl.h

    rc0f1f52 r7f742432  
    894894  Scheduler_Node *scheduler_node;
    895895
    896   scheduler_node = _Thread_Scheduler_get_own_node( the_thread );
     896  scheduler_node = _Thread_Scheduler_get_home_node( the_thread );
    897897  _Scheduler_Node_set_priority( scheduler_node, new_priority, prepend_it );
    898898}
     
    12481248  }
    12491249
    1250   old_scheduler_node = _Thread_Scheduler_get_own_node( the_thread );
     1250  old_scheduler_node = _Thread_Scheduler_get_home_node( the_thread );
    12511251  _Priority_Plain_extract(
    12521252    &old_scheduler_node->Wait.Priority,
     
    13151315      the_thread->Scheduler.own_control = new_scheduler;
    13161316      the_thread->Scheduler.control = new_scheduler;
    1317       the_thread->Scheduler.own_node = new_scheduler_node;
    13181317      _Scheduler_Node_set_priority( new_scheduler_node, priority, false );
    13191318
  • cpukit/score/include/rtems/score/schedulersmpimpl.h

    rc0f1f52 r7f742432  
    384384)
    385385{
    386   return (Scheduler_SMP_Node *) _Thread_Scheduler_get_own_node( thread );
     386  return (Scheduler_SMP_Node *) _Thread_Scheduler_get_home_node( thread );
    387387}
    388388
  • cpukit/score/include/rtems/score/thread.h

    rc0f1f52 r7f742432  
    270270
    271271  /**
    272    * @brief The own scheduler node of this thread.
    273    *
    274    * This field is constant after initialization.  It is used by change
    275    * priority and ask for help operations.
    276    */
    277   Scheduler_Node *own_node;
    278 
    279   /**
    280272   * @brief The processor assigned by the current scheduler.
    281273   */
  • cpukit/score/include/rtems/score/threadimpl.h

    rc0f1f52 r7f742432  
    10051005}
    10061006#endif
    1007 
    1008 RTEMS_INLINE_ROUTINE Scheduler_Node *_Thread_Scheduler_get_own_node(
    1009   const Thread_Control *the_thread
    1010 )
    1011 {
    1012 #if defined(RTEMS_SMP)
    1013   return the_thread->Scheduler.own_node;
    1014 #else
    1015   return the_thread->Scheduler.nodes;
    1016 #endif
    1017 }
    10181007
    10191008RTEMS_INLINE_ROUTINE Scheduler_Node *_Thread_Scheduler_get_home_node(
     
    11511140  Scheduler_Node *scheduler_node;
    11521141
    1153   scheduler_node = _Thread_Scheduler_get_own_node( the_thread );
     1142  scheduler_node = _Thread_Scheduler_get_home_node( the_thread );
    11541143  return _Priority_Get_priority( &scheduler_node->Wait.Priority );
    11551144}
  • cpukit/score/src/threadchangepriority.c

    rc0f1f52 r7f742432  
    245245)
    246246{
    247   Scheduler_Node     *own_node;
     247  Scheduler_Node     *scheduler_node;
    248248  Thread_queue_Queue *queue;
    249249
    250   own_node = _Thread_Scheduler_get_own_node( the_thread );
     250  scheduler_node = _Thread_Scheduler_get_home_node( the_thread );
    251251  _Priority_Actions_initialize_one(
    252252    &queue_context->Priority.Actions,
    253     &own_node->Wait.Priority,
     253    &scheduler_node->Wait.Priority,
    254254    priority_action_node,
    255255    priority_action_type
     
    327327)
    328328{
    329   Scheduler_Node *own_node;
    330 
    331   own_node = _Thread_Scheduler_get_own_node( the_thread );
    332   _Priority_Replace( &own_node->Wait.Priority, victim_node, replacement_node );
     329  Scheduler_Node *scheduler_node;
     330
     331  scheduler_node = _Thread_Scheduler_get_home_node( the_thread );
     332  _Priority_Replace(
     333    &scheduler_node->Wait.Priority,
     334    victim_node,
     335    replacement_node
     336  );
    333337}
    334338
  • cpukit/score/src/threadinitialize.c

    rc0f1f52 r7f742432  
    215215  );
    216216#else
    217   scheduler_node = _Thread_Scheduler_get_own_node( the_thread );
     217  scheduler_node = _Thread_Scheduler_get_home_node( the_thread );
    218218  _Scheduler_Node_initialize(
    219219    scheduler,
     
    235235  the_thread->Scheduler.own_control = scheduler;
    236236  the_thread->Scheduler.control = scheduler;
    237   the_thread->Scheduler.own_node = scheduler_node;
    238237  _ISR_lock_Initialize( &the_thread->Scheduler.Lock, "Thread Scheduler" );
    239238  _ISR_lock_Initialize( &the_thread->Wait.Lock.Default, "Thread Wait Default" );
  • cpukit/score/src/threadmp.c

    rc0f1f52 r7f742432  
    7676    _RBTree_Initialize_node( &proxy->Active );
    7777
    78 #if defined(RTEMS_SMP)
    79     proxy->Scheduler.own_node = &proxy->Scheduler_node;
    80 #endif
    8178    proxy->Scheduler.nodes = &proxy->Scheduler_node;
    8279    _Scheduler_Node_do_initialize(
  • cpukit/score/src/threadqflush.c

    rc0f1f52 r7f742432  
    100100      Scheduler_Node *scheduler_node;
    101101
    102       scheduler_node = _Thread_Scheduler_get_own_node( first );
     102      scheduler_node = _Thread_Scheduler_get_home_node( first );
    103103      _Chain_Append_unprotected(
    104104        &unblock,
  • cpukit/score/src/threadqops.c

    rc0f1f52 r7f742432  
    143143  Scheduler_Node *scheduler_node;
    144144
    145   scheduler_node = _Thread_Scheduler_get_own_node( the_thread );
     145  scheduler_node = _Thread_Scheduler_get_home_node( the_thread );
    146146
    147147  _Chain_Initialize_node( &scheduler_node->Wait.Priority.Node.Node.Chain );
     
    161161  Scheduler_Node *scheduler_node;
    162162
    163   scheduler_node = _Thread_Scheduler_get_own_node( the_thread );
     163  scheduler_node = _Thread_Scheduler_get_home_node( the_thread );
    164164
    165165  _Chain_Initialize_node( &scheduler_node->Wait.Priority.Node.Node.Chain );
     
    183183  (void) queue_context;
    184184
    185   scheduler_node = _Thread_Scheduler_get_own_node( the_thread );
     185  scheduler_node = _Thread_Scheduler_get_home_node( the_thread );
    186186
    187187  _Chain_Extract_unprotected( &scheduler_node->Wait.Priority.Node.Node.Chain );
     
    892892  queue = arg;
    893893  owner = queue->owner;
    894   scheduler_node_of_owner = _Thread_Scheduler_get_own_node( owner );
     894  scheduler_node_of_owner = _Thread_Scheduler_get_home_node( owner );
    895895  queue_context = THREAD_QUEUE_CONTEXT_OF_PRIORITY_ACTIONS( priority_actions );
    896896
     
    13861386  }
    13871387#else
    1388   scheduler_node = _Thread_Scheduler_get_own_node( the_thread );
     1388  scheduler_node = _Thread_Scheduler_get_home_node( the_thread );
    13891389  priority_queue = _Thread_queue_Priority_queue( heads, scheduler_node );
    13901390  scheduler_node_of_owner = priority_queue->scheduler_node;
  • cpukit/score/src/threadrestart.c

    rc0f1f52 r7f742432  
    171171  _Scheduler_Node_destroy(
    172172    _Scheduler_Get( the_thread ),
    173     _Thread_Scheduler_get_own_node( the_thread )
     173    _Thread_Scheduler_get_home_node( the_thread )
    174174  );
    175175  _ISR_lock_Destroy( &the_thread->Timer.Lock );
Note: See TracChangeset for help on using the changeset viewer.