Changeset 2a4f9d7 in rtems


Ignore:
Timestamp:
Dec 23, 2014, 7:28:24 AM (5 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
ad0743db
Parents:
cfe6d05
git-author:
Sebastian Huber <sebastian.huber@…> (12/23/14 07:28:24)
git-committer:
Sebastian Huber <sebastian.huber@…> (01/09/15 13:03:32)
Message:

smp: Add and use _SMP_Should_start_processor()

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/i386/shared/smp/smp-imps.c

    rcfe6d05 r2a4f9d7  
    5858#include <bsp/irq.h>
    5959#include <rtems/score/smpimpl.h>
    60 #include <rtems/score/schedulerimpl.h>
    6160
    6261/*
     
    388387    case IMPS_BCT_PROCESSOR:
    389388      if ( imps_num_cpus < rtems_configuration_get_maximum_processors() ) {
    390         const Scheduler_Assignment *assignment =
    391           _Scheduler_Get_assignment((uint32_t) imps_num_cpus);
    392 
    393         if (_Scheduler_Should_start_processor(assignment)) {
     389        if (_SMP_Should_start_processor((uint32_t) imps_num_cpus)) {
    394390          add_processor((imps_processor *)start);
    395391        }
  • c/src/lib/libbsp/sparc/leon3/startup/bspclean.c

    rcfe6d05 r2a4f9d7  
    2424#include <rtems/bspIo.h>
    2525#include <rtems/score/smpimpl.h>
    26 #include <rtems/score/schedulerimpl.h>
    2726
    2827void bsp_fatal_extension(
     
    5655
    5756      for (i = 0; i < cpu_count; ++i) {
    58         const Scheduler_Assignment *assignment = _Scheduler_Get_assignment( i );
    59 
    60         if ( (i != self_cpu) &&
    61             _Scheduler_Should_start_processor( assignment ) ) {
     57        if ( (i != self_cpu) && _SMP_Should_start_processor( i ) ) {
    6258          halt_mask |= UINT32_C(1) << i;
    6359        }
  • cpukit/score/include/rtems/score/smpimpl.h

    rcfe6d05 r2a4f9d7  
    172172
    173173/**
     174 *  @brief Returns true, if the processor with the specified index should be
     175 *  started.
     176 *
     177 *  @param[in] cpu_index The processor index.
     178 *
     179 *  @retval true The processor should be started.
     180 *  @retval false Otherwise.
     181 */
     182bool _SMP_Should_start_processor( uint32_t cpu_index );
     183
     184/**
    174185 *  @brief Sends a SMP message to a processor.
    175186 *
  • cpukit/score/src/smp.c

    rcfe6d05 r2a4f9d7  
    119119}
    120120
     121bool _SMP_Should_start_processor( uint32_t cpu_index )
     122{
     123  const Scheduler_Assignment *assignment =
     124    _Scheduler_Get_assignment( cpu_index );
     125
     126  return _Scheduler_Should_start_processor( assignment );
     127}
     128
    121129void _SMP_Start_multitasking_on_secondary_processor( void )
    122130{
    123131  Per_CPU_Control *self_cpu = _Per_CPU_Get();
    124132  uint32_t cpu_index_self = _Per_CPU_Get_index( self_cpu );
    125   const Scheduler_Assignment *assignment =
    126     _Scheduler_Get_assignment( cpu_index_self );
    127133
    128134  if ( cpu_index_self >= rtems_configuration_get_maximum_processors() ) {
     
    130136  }
    131137
    132   if ( !_Scheduler_Should_start_processor( assignment ) ) {
     138  if ( !_SMP_Should_start_processor( cpu_index_self ) ) {
    133139    _SMP_Fatal( SMP_FATAL_MULTITASKING_START_ON_UNASSIGNED_PROCESSOR );
    134140  }
Note: See TracChangeset for help on using the changeset viewer.