Changeset b3a4c48e in rtems


Ignore:
Timestamp:
Feb 17, 2016, 1:27:09 PM (4 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
3c103ba
Parents:
c284a16
git-author:
Sebastian Huber <sebastian.huber@…> (02/17/16 13:27:09)
git-committer:
Sebastian Huber <sebastian.huber@…> (03/04/16 12:36:09)
Message:

score: Add _SMP_Online_processors

Files:
3 edited

Legend:

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

    rc284a16 rb3a4c48e  
    2121#include <rtems/score/smp.h>
    2222#include <rtems/score/percpu.h>
     23#include <rtems/score/processormask.h>
    2324#include <rtems/fatal.h>
    2425#include <rtems/rtems/cache.h>
     
    9293
    9394/**
     95 * @brief Set of online processors.
     96 *
     97 * A processor is online if was started during system initialization.  In this
     98 * case its corresponding bit in the mask is set.
     99 *
     100 * @see _SMP_Handler_initialize().
     101 */
     102extern Processor_mask _SMP_Online_processors;
     103
     104/**
    94105 * @brief Performs high-level initialization of a secondary processor and runs
    95106 * the application threads.
  • cpukit/score/src/smp.c

    rc284a16 rb3a4c48e  
    3030#endif
    3131
     32Processor_mask _SMP_Online_processors;
     33
    3234uint32_t _SMP_Processor_count;
    3335
     
    3638  uint32_t cpu_index_self = _SMP_Get_current_processor();
    3739  uint32_t cpu_index;
    38 
    3940
    4041  for ( cpu_index = 0 ; cpu_index < cpu_count; ++cpu_index ) {
     
    7071      ++context->processor_count;
    7172      cpu->scheduler_context = context;
     73
     74      _Processor_mask_Set( _SMP_Online_processors, cpu_index );
    7275    }
    7376  }
  • testsuites/smptests/smpipi01/init.c

    rc284a16 rb3a4c48e  
    162162
    163163  for (cpu_index = 0; cpu_index < cpu_count; ++cpu_index) {
     164    rtems_test_assert(
     165      _Processor_mask_Is_set(_SMP_Online_processors, cpu_index)
     166    );
     167
    164168    printf(
    165169      "inter-processor interrupts for processor %"
     
    170174    );
    171175  }
     176
     177  for (; cpu_index < CPU_COUNT; ++cpu_index) {
     178    rtems_test_assert(
     179      !_Processor_mask_Is_set(_SMP_Online_processors, cpu_index)
     180    );
     181  }
    172182}
    173183
Note: See TracChangeset for help on using the changeset viewer.