Changeset 3eda7e5 in rtems


Ignore:
Timestamp:
06/14/16 08:11:05 (7 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
5, master
Children:
042072b
Parents:
0c34dbf3
git-author:
Sebastian Huber <sebastian.huber@…> (06/14/16 08:11:05)
git-committer:
Sebastian Huber <sebastian.huber@…> (06/14/16 09:57:37)
Message:

score: _Thread_Create_idle_for_CPU()

Use priority maximum of scheduler instance.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/score/src/threadcreateidle.c

    r0c34dbf3 r3eda7e5  
    2626#include <rtems/config.h>
    2727
    28 static void _Thread_Create_idle_for_cpu( Per_CPU_Control *cpu )
     28static void _Thread_Create_idle_for_CPU( Per_CPU_Control *cpu )
    2929{
    3030  Objects_Name             name;
    3131  Thread_Control          *idle;
    3232  const Scheduler_Control *scheduler;
     33
     34  scheduler = _Scheduler_Get_by_CPU( cpu );
     35
     36#if defined(RTEMS_SMP)
     37  if (scheduler == NULL) {
     38    return;
     39  }
     40#endif
    3341
    3442  name.name_u32 = _Objects_Build_name( 'I', 'D', 'L', 'E' );
     
    4452    &_Thread_Internal_information,
    4553    idle,
    46     _Scheduler_Get_by_CPU( cpu ),
     54    scheduler,
    4755    NULL,        /* allocate the stack */
    4856    _Stack_Ensure_minimum( rtems_configuration_get_idle_task_stack_size() ),
    4957    CPU_IDLE_TASK_IS_FP,
    50     PRIORITY_MAXIMUM,
     58    scheduler->maximum_priority,
    5159    true,        /* preemptable */
    5260    THREAD_CPU_BUDGET_ALGORITHM_NONE,
     
    6876  _Thread_Load_environment( idle );
    6977
    70   scheduler = _Scheduler_Get_by_CPU( cpu );
    71 
    72 #if defined(RTEMS_SMP)
    73   if (scheduler == NULL) {
    74     return;
    75   }
    76 #endif
    77 
    7878  idle->current_state = STATES_READY;
    7979  _Scheduler_Start_idle( scheduler, idle, cpu );
     
    9292
    9393    if ( _Per_CPU_Is_processor_online( cpu ) ) {
    94       _Thread_Create_idle_for_cpu( cpu );
     94      _Thread_Create_idle_for_CPU( cpu );
    9595    }
    9696  }
Note: See TracChangeset for help on using the changeset viewer.