Changeset 266d383 in rtems


Ignore:
Timestamp:
Sep 8, 2016, 12:07:12 PM (3 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
6ae309ec
Parents:
5d6b211
git-author:
Sebastian Huber <sebastian.huber@…> (09/08/16 12:07:12)
git-committer:
Sebastian Huber <sebastian.huber@…> (09/21/16 06:59:32)
Message:

score: Manage scheduler nodes via thread queues

Update #2556.

Location:
cpukit/score
Files:
5 edited

Legend:

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

    r5d6b211 r266d383  
    14241424
    14251425#if defined(RTEMS_SMP)
     1426  _Chain_Extract_unprotected( &old_scheduler_node->Thread.Wait_node );
     1427  _Assert( _Chain_Is_empty( &the_thread->Scheduler.Wait_nodes ) );
     1428  _Chain_Initialize_one(
     1429    &the_thread->Scheduler.Wait_nodes,
     1430    &new_scheduler_node->Thread.Wait_node
     1431  );
     1432
    14261433  {
    14271434    const Scheduler_Control *old_scheduler;
  • cpukit/score/include/rtems/score/schedulernode.h

    r5d6b211 r266d383  
    139139   */
    140140  struct _Thread_Control *accepts_help;
     141
     142  /**
     143   * @brief Block to register and manage this scheduler node in the thread
     144   * control block of the owner of this scheduler node.
     145   */
     146  struct {
     147    /**
     148     * @brief Node to add this scheduler node to
     149     * Thread_Control::Scheduler::Wait_nodes.
     150     */
     151    Chain_Node Wait_node;
     152  } Thread;
    141153#endif
    142154
  • cpukit/score/include/rtems/score/schedulernodeimpl.h

    r5d6b211 r266d383  
    4343
    4444#if defined(RTEMS_SMP)
     45  _Chain_Initialize_node( &node->Thread.Wait_node );
    4546  node->Wait.Priority.scheduler = scheduler;
    4647  node->user = the_thread;
  • cpukit/score/include/rtems/score/thread.h

    r5d6b211 r266d383  
    288288   */
    289289  struct Per_CPU_Control *cpu;
     290
     291  /**
     292   * @brief Scheduler nodes immediately available to the thread by its home
     293   * scheduler instance and due to thread queue ownerships.
     294   *
     295   * This chain is protected by the thread wait lock.
     296   */
     297  Chain_Control Wait_nodes;
    290298#endif
    291299
  • cpukit/score/src/threadinitialize.c

    r5d6b211 r266d383  
    206206    ++scheduler_index;
    207207  }
     208
     209  _Chain_Initialize_one(
     210    &the_thread->Scheduler.Wait_nodes,
     211    &scheduler_node->Thread.Wait_node
     212  );
    208213#else
    209214  scheduler_node = _Thread_Scheduler_get_own_node( the_thread );
Note: See TracChangeset for help on using the changeset viewer.