Changeset d8bc0730 in rtems


Ignore:
Timestamp:
Sep 7, 2018, 9:27:45 AM (8 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
7097962
Parents:
cfc4231d
git-author:
Sebastian Huber <sebastian.huber@…> (09/07/18 09:27:45)
git-committer:
Sebastian Huber <sebastian.huber@…> (09/10/18 08:38:45)
Message:

score: Modify _Scheduler_Unblock()

In SMP configurations, obtain the scheduler node for the block and
unblock operations through the same way via
Thread_Control::Scheduler::Scheduler_node. This symmetry is important
in a follow up patch which introduces thread pinning.

Update #3508.

File:
1 edited

Legend:

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

    rcfc4231d rd8bc0730  
    300300RTEMS_INLINE_ROUTINE void _Scheduler_Unblock( Thread_Control *the_thread )
    301301{
     302  Scheduler_Node          *scheduler_node;
    302303  const Scheduler_Control *scheduler;
    303304  ISR_lock_Context         lock_context;
    304305
     306#if defined(RTEMS_SMP)
     307  scheduler_node = SCHEDULER_NODE_OF_THREAD_SCHEDULER_NODE(
     308    _Chain_First( &the_thread->Scheduler.Scheduler_nodes )
     309  );
     310  scheduler = _Scheduler_Node_get_scheduler( scheduler_node );
     311#else
     312  scheduler_node = _Thread_Scheduler_get_home_node( the_thread );
    305313  scheduler = _Thread_Scheduler_get_home( the_thread );
     314#endif
     315
    306316  _Scheduler_Acquire_critical( scheduler, &lock_context );
    307   ( *scheduler->Operations.unblock )(
    308     scheduler,
    309     the_thread,
    310     _Thread_Scheduler_get_home_node( the_thread )
    311   );
     317  ( *scheduler->Operations.unblock )( scheduler, the_thread, scheduler_node );
    312318  _Scheduler_Release_critical( scheduler, &lock_context );
    313319}
Note: See TracChangeset for help on using the changeset viewer.