forked from Imagelibrary/rtems
score: Rename rtems_smp_get_number_of_processors()
Rename in rtems_smp_get_processor_count(). Always provide <rtems/score/smp.h> and <rtems/rtems/smp.h>. Add _SMP_Get_processor_count(). This function will be a compile time constant defined to be one on uni-processor configurations. This allows iterations over all processors without overhead on uni-processor configurations.
This commit is contained in:
@@ -130,7 +130,7 @@ void bsp_smp_broadcast_interrupt(void)
|
|||||||
int max_cpus;
|
int max_cpus;
|
||||||
|
|
||||||
cpu = bsp_smp_processor_id();
|
cpu = bsp_smp_processor_id();
|
||||||
max_cpus = rtems_smp_get_number_of_processors();
|
max_cpus = rtems_smp_get_processor_count();
|
||||||
|
|
||||||
for ( dest_cpu=0 ; dest_cpu < max_cpus ; dest_cpu++ ) {
|
for ( dest_cpu=0 ; dest_cpu < max_cpus ; dest_cpu++ ) {
|
||||||
if ( cpu == dest_cpu )
|
if ( cpu == dest_cpu )
|
||||||
|
|||||||
@@ -39,7 +39,7 @@
|
|||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
int cpu;
|
int cpu;
|
||||||
for ( cpu=0 ; cpu < rtems_smp_get_number_of_processors() ; cpu++ ) {
|
for ( cpu=0 ; cpu < rtems_smp_get_processor_count() ; cpu++ ) {
|
||||||
Per_CPU_Control *p = &_Per_CPU_Information[cpu];
|
Per_CPU_Control *p = &_Per_CPU_Information[cpu];
|
||||||
if ( p->executing->Object.id == the_thread->Object.id ) {
|
if ( p->executing->Object.id == the_thread->Object.id ) {
|
||||||
*time_of_context_switch = p->time_of_last_context_switch;
|
*time_of_context_switch = p->time_of_last_context_switch;
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ include_rtems_rtems_HEADERS += include/rtems/rtems/region.h
|
|||||||
include_rtems_rtems_HEADERS += include/rtems/rtems/rtemsapi.h
|
include_rtems_rtems_HEADERS += include/rtems/rtems/rtemsapi.h
|
||||||
include_rtems_rtems_HEADERS += include/rtems/rtems/sem.h
|
include_rtems_rtems_HEADERS += include/rtems/rtems/sem.h
|
||||||
include_rtems_rtems_HEADERS += include/rtems/rtems/signal.h
|
include_rtems_rtems_HEADERS += include/rtems/rtems/signal.h
|
||||||
|
include_rtems_rtems_HEADERS += include/rtems/rtems/smp.h
|
||||||
include_rtems_rtems_HEADERS += include/rtems/rtems/status.h
|
include_rtems_rtems_HEADERS += include/rtems/rtems/status.h
|
||||||
include_rtems_rtems_HEADERS += include/rtems/rtems/support.h
|
include_rtems_rtems_HEADERS += include/rtems/rtems/support.h
|
||||||
include_rtems_rtems_HEADERS += include/rtems/rtems/tasks.h
|
include_rtems_rtems_HEADERS += include/rtems/rtems/tasks.h
|
||||||
@@ -54,10 +55,6 @@ include_rtems_rtems_HEADERS += include/rtems/rtems/signalmp.h
|
|||||||
include_rtems_rtems_HEADERS += include/rtems/rtems/taskmp.h
|
include_rtems_rtems_HEADERS += include/rtems/rtems/taskmp.h
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if HAS_SMP
|
|
||||||
include_rtems_rtems_HEADERS += include/rtems/rtems/smp.h
|
|
||||||
endif
|
|
||||||
|
|
||||||
include_rtems_rtems_HEADERS += inline/rtems/rtems/asr.inl
|
include_rtems_rtems_HEADERS += inline/rtems/rtems/asr.inl
|
||||||
include_rtems_rtems_HEADERS += inline/rtems/rtems/attr.inl
|
include_rtems_rtems_HEADERS += inline/rtems/rtems/attr.inl
|
||||||
include_rtems_rtems_HEADERS += inline/rtems/rtems/barrier.inl
|
include_rtems_rtems_HEADERS += inline/rtems/rtems/barrier.inl
|
||||||
|
|||||||
@@ -73,9 +73,7 @@ extern "C" {
|
|||||||
#if defined(RTEMS_MULTIPROCESSING)
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
#include <rtems/rtems/mp.h>
|
#include <rtems/rtems/mp.h>
|
||||||
#endif
|
#endif
|
||||||
#if defined(RTEMS_SMP)
|
|
||||||
#include <rtems/rtems/smp.h>
|
#include <rtems/rtems/smp.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#include <rtems/rtems/support.h>
|
#include <rtems/rtems/support.h>
|
||||||
|
|||||||
@@ -1,16 +1,13 @@
|
|||||||
/**
|
/**
|
||||||
* @file rtems/rtems/smp.h
|
* @file
|
||||||
*
|
*
|
||||||
* @defgroup ClassicSMP Classic API SMP Services
|
* @ingroup ClassicSMP
|
||||||
*
|
*
|
||||||
* @ingroup ClassicRTEMS
|
* @brief SMP Services API
|
||||||
* @brief SMP information and services.
|
|
||||||
*
|
|
||||||
* Most of the SMP interface is hidden from the application
|
|
||||||
* and exists between the BSP and RTEMS.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* COPYRIGHT (c) 1989-2011.
|
/*
|
||||||
|
* COPYRIGHT (c) 1989-2011.
|
||||||
* On-Line Applications Research Corporation (OAR).
|
* On-Line Applications Research Corporation (OAR).
|
||||||
*
|
*
|
||||||
* The license and distribution terms for this file may be
|
* The license and distribution terms for this file may be
|
||||||
@@ -28,25 +25,34 @@ extern "C" {
|
|||||||
#include <rtems/score/smp.h>
|
#include <rtems/score/smp.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @defgroup ClassicSMP Classic API SMP Services
|
* @defgroup ClassicSMP SMP Services
|
||||||
*
|
*
|
||||||
* @ingroup ClassicRTEMS
|
* @ingroup ClassicRTEMS
|
||||||
*
|
*
|
||||||
* This encapsulates functionality which is useful for SMP applications.
|
* This encapsulates functionality which is useful for SMP applications.
|
||||||
|
*
|
||||||
|
* This API is also available on uni-processor configurations. Here compile
|
||||||
|
* time constants are used whenever possible.
|
||||||
|
*
|
||||||
|
* @{
|
||||||
*/
|
*/
|
||||||
/**@{*/
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Obtain Number of Cores in System
|
* @brief Returns the count of processors in the system.
|
||||||
*
|
*
|
||||||
* This method returns the number of CPU cores that are currently in
|
* On uni-processor configurations this is a compile time constant and defined
|
||||||
* the system. This will always be less than or equal to the number
|
* to be one.
|
||||||
* of maximum number of cores which were configured.
|
|
||||||
*
|
*
|
||||||
* @retval This method returns the number of cores in this system.
|
* On SMP configurations this returns the value of a global variable set during
|
||||||
|
* system initialization to indicate the count of processors. The processor
|
||||||
|
* count depends on the hardware and application configuration. The value will
|
||||||
|
* always be less than or equal to the maximum count of application configured
|
||||||
|
* processors.
|
||||||
|
*
|
||||||
|
* @return The count of processors in the system.
|
||||||
*/
|
*/
|
||||||
#define rtems_smp_get_number_of_processors() \
|
#define rtems_smp_get_processor_count() \
|
||||||
(_SMP_Processor_count)
|
_SMP_Get_processor_count()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Obtain Current Core Number
|
* @brief Obtain Current Core Number
|
||||||
@@ -58,7 +64,7 @@ extern "C" {
|
|||||||
#define rtems_smp_get_current_processor() \
|
#define rtems_smp_get_current_processor() \
|
||||||
bsp_smp_processor_id()
|
bsp_smp_processor_id()
|
||||||
|
|
||||||
/**@}*/
|
/** @} */
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -107,6 +107,10 @@ $(PROJECT_INCLUDE)/rtems/rtems/signal.h: include/rtems/rtems/signal.h $(PROJECT_
|
|||||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/rtems/signal.h
|
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/rtems/signal.h
|
||||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/rtems/signal.h
|
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/rtems/signal.h
|
||||||
|
|
||||||
|
$(PROJECT_INCLUDE)/rtems/rtems/smp.h: include/rtems/rtems/smp.h $(PROJECT_INCLUDE)/rtems/rtems/$(dirstamp)
|
||||||
|
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/rtems/smp.h
|
||||||
|
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/rtems/smp.h
|
||||||
|
|
||||||
$(PROJECT_INCLUDE)/rtems/rtems/status.h: include/rtems/rtems/status.h $(PROJECT_INCLUDE)/rtems/rtems/$(dirstamp)
|
$(PROJECT_INCLUDE)/rtems/rtems/status.h: include/rtems/rtems/status.h $(PROJECT_INCLUDE)/rtems/rtems/$(dirstamp)
|
||||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/rtems/status.h
|
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/rtems/status.h
|
||||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/rtems/status.h
|
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/rtems/status.h
|
||||||
@@ -168,11 +172,6 @@ $(PROJECT_INCLUDE)/rtems/rtems/taskmp.h: include/rtems/rtems/taskmp.h $(PROJECT_
|
|||||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/rtems/taskmp.h
|
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/rtems/taskmp.h
|
||||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/rtems/taskmp.h
|
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/rtems/taskmp.h
|
||||||
endif
|
endif
|
||||||
if HAS_SMP
|
|
||||||
$(PROJECT_INCLUDE)/rtems/rtems/smp.h: include/rtems/rtems/smp.h $(PROJECT_INCLUDE)/rtems/rtems/$(dirstamp)
|
|
||||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/rtems/smp.h
|
|
||||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/rtems/smp.h
|
|
||||||
endif
|
|
||||||
$(PROJECT_INCLUDE)/rtems/rtems/asr.inl: inline/rtems/rtems/asr.inl $(PROJECT_INCLUDE)/rtems/rtems/$(dirstamp)
|
$(PROJECT_INCLUDE)/rtems/rtems/asr.inl: inline/rtems/rtems/asr.inl $(PROJECT_INCLUDE)/rtems/rtems/$(dirstamp)
|
||||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/rtems/asr.inl
|
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/rtems/asr.inl
|
||||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/rtems/asr.inl
|
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/rtems/asr.inl
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ include_rtems_score_HEADERS += include/rtems/score/schedulercbs.h
|
|||||||
include_rtems_score_HEADERS += include/rtems/score/scheduleredf.h
|
include_rtems_score_HEADERS += include/rtems/score/scheduleredf.h
|
||||||
include_rtems_score_HEADERS += include/rtems/score/schedulerpriority.h
|
include_rtems_score_HEADERS += include/rtems/score/schedulerpriority.h
|
||||||
include_rtems_score_HEADERS += include/rtems/score/schedulersimple.h
|
include_rtems_score_HEADERS += include/rtems/score/schedulersimple.h
|
||||||
|
include_rtems_score_HEADERS += include/rtems/score/smp.h
|
||||||
include_rtems_score_HEADERS += include/rtems/score/smplock.h
|
include_rtems_score_HEADERS += include/rtems/score/smplock.h
|
||||||
include_rtems_score_HEADERS += include/rtems/score/stack.h
|
include_rtems_score_HEADERS += include/rtems/score/stack.h
|
||||||
include_rtems_score_HEADERS += include/rtems/score/states.h
|
include_rtems_score_HEADERS += include/rtems/score/states.h
|
||||||
@@ -62,9 +63,6 @@ include_rtems_score_HEADERS += include/rtems/score/basedefs.h
|
|||||||
include_rtems_score_HEADERS += include/rtems/score/atomic.h
|
include_rtems_score_HEADERS += include/rtems/score/atomic.h
|
||||||
include_rtems_score_HEADERS += include/rtems/score/genericcpuatomic.h
|
include_rtems_score_HEADERS += include/rtems/score/genericcpuatomic.h
|
||||||
include_rtems_score_HEADERS += include/rtems/score/genericatomicops.h
|
include_rtems_score_HEADERS += include/rtems/score/genericatomicops.h
|
||||||
if HAS_SMP
|
|
||||||
include_rtems_score_HEADERS += include/rtems/score/smp.h
|
|
||||||
endif
|
|
||||||
|
|
||||||
if HAS_PTHREADS
|
if HAS_PTHREADS
|
||||||
include_rtems_score_HEADERS += include/rtems/score/corespinlock.h
|
include_rtems_score_HEADERS += include/rtems/score/corespinlock.h
|
||||||
|
|||||||
@@ -1,10 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* @file rtems/score/smp.h
|
* @file
|
||||||
*
|
*
|
||||||
* @brief Interface to the SuperCore SMP Support used Internally to RTEMS
|
* @ingroup ScoreSMP
|
||||||
*
|
*
|
||||||
* This include file defines the interface to the SuperCore
|
* @brief SuperCore SMP Support API
|
||||||
* SMP support that is used internally to RTEMS.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -19,24 +18,22 @@
|
|||||||
#ifndef _RTEMS_SCORE_SMP_H
|
#ifndef _RTEMS_SCORE_SMP_H
|
||||||
#define _RTEMS_SCORE_SMP_H
|
#define _RTEMS_SCORE_SMP_H
|
||||||
|
|
||||||
#if defined (RTEMS_SMP)
|
#include <rtems/score/cpu.h>
|
||||||
#include <rtems/score/percpu.h>
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @defgroup SuperCoreSMP SMP Support
|
|
||||||
*
|
|
||||||
* @ingroup Score
|
|
||||||
*
|
|
||||||
* This defines the interface of the SuperCore support
|
|
||||||
* code for SMP support.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**@{*/
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @defgroup ScoreSMP SMP Support
|
||||||
|
*
|
||||||
|
* @ingroup Score
|
||||||
|
*
|
||||||
|
* This defines the interface of the SuperCore SMP support.
|
||||||
|
*
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This defines the bit which indicates the interprocessor interrupt
|
* This defines the bit which indicates the interprocessor interrupt
|
||||||
* has been requested so that RTEMS will reschedule on this CPU
|
* has been requested so that RTEMS will reschedule on this CPU
|
||||||
@@ -58,14 +55,20 @@ extern "C" {
|
|||||||
*/
|
*/
|
||||||
#define RTEMS_BSP_SMP_SHUTDOWN 0x04
|
#define RTEMS_BSP_SMP_SHUTDOWN 0x04
|
||||||
|
|
||||||
#ifndef ASM
|
#if !defined( ASM )
|
||||||
/**
|
|
||||||
* @brief Number of CPUs in a SMP system.
|
#if defined( RTEMS_SMP )
|
||||||
*
|
SCORE_EXTERN uint32_t _SMP_Processor_count;
|
||||||
* This variable is set during the SMP initialization sequence to
|
|
||||||
* indicate the number of CPUs in this system.
|
static inline uint32_t _SMP_Get_processor_count( void )
|
||||||
*/
|
{
|
||||||
SCORE_EXTERN uint32_t _SMP_Processor_count;
|
return _SMP_Processor_count;
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
#define _SMP_Get_processor_count() ( ( uint32_t ) 1 )
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined( RTEMS_SMP )
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Sends a SMP message to a processor.
|
* @brief Sends a SMP message to a processor.
|
||||||
@@ -114,14 +117,15 @@ void _SMP_Request_other_cores_to_dispatch(void);
|
|||||||
*/
|
*/
|
||||||
void _SMP_Request_other_cores_to_shutdown(void);
|
void _SMP_Request_other_cores_to_shutdown(void);
|
||||||
|
|
||||||
#endif
|
#endif /* defined( RTEMS_SMP ) */
|
||||||
|
|
||||||
|
#endif /* !defined( ASM ) */
|
||||||
|
|
||||||
|
/** @} */
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**@}*/
|
|
||||||
#endif
|
#endif
|
||||||
/* end of include file */
|
/* end of include file */
|
||||||
|
|||||||
@@ -143,6 +143,10 @@ $(PROJECT_INCLUDE)/rtems/score/schedulersimple.h: include/rtems/score/schedulers
|
|||||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/schedulersimple.h
|
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/schedulersimple.h
|
||||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/schedulersimple.h
|
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/schedulersimple.h
|
||||||
|
|
||||||
|
$(PROJECT_INCLUDE)/rtems/score/smp.h: include/rtems/score/smp.h $(PROJECT_INCLUDE)/rtems/score/$(dirstamp)
|
||||||
|
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/smp.h
|
||||||
|
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/smp.h
|
||||||
|
|
||||||
$(PROJECT_INCLUDE)/rtems/score/smplock.h: include/rtems/score/smplock.h $(PROJECT_INCLUDE)/rtems/score/$(dirstamp)
|
$(PROJECT_INCLUDE)/rtems/score/smplock.h: include/rtems/score/smplock.h $(PROJECT_INCLUDE)/rtems/score/$(dirstamp)
|
||||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/smplock.h
|
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/smplock.h
|
||||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/smplock.h
|
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/smplock.h
|
||||||
@@ -231,11 +235,6 @@ $(PROJECT_INCLUDE)/rtems/score/genericatomicops.h: include/rtems/score/genericat
|
|||||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/genericatomicops.h
|
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/genericatomicops.h
|
||||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/genericatomicops.h
|
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/genericatomicops.h
|
||||||
|
|
||||||
if HAS_SMP
|
|
||||||
$(PROJECT_INCLUDE)/rtems/score/smp.h: include/rtems/score/smp.h $(PROJECT_INCLUDE)/rtems/score/$(dirstamp)
|
|
||||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/smp.h
|
|
||||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/smp.h
|
|
||||||
endif
|
|
||||||
if HAS_PTHREADS
|
if HAS_PTHREADS
|
||||||
$(PROJECT_INCLUDE)/rtems/score/corespinlock.h: include/rtems/score/corespinlock.h $(PROJECT_INCLUDE)/rtems/score/$(dirstamp)
|
$(PROJECT_INCLUDE)/rtems/score/corespinlock.h: include/rtems/score/corespinlock.h $(PROJECT_INCLUDE)/rtems/score/$(dirstamp)
|
||||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/corespinlock.h
|
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/corespinlock.h
|
||||||
|
|||||||
@@ -126,7 +126,7 @@ void _SMP_Send_message( int cpu, uint32_t message )
|
|||||||
void _SMP_Broadcast_message( uint32_t message )
|
void _SMP_Broadcast_message( uint32_t message )
|
||||||
{
|
{
|
||||||
int self = bsp_smp_processor_id();
|
int self = bsp_smp_processor_id();
|
||||||
int ncpus = _SMP_Processor_count;
|
int ncpus = _SMP_Get_processor_count();
|
||||||
int cpu;
|
int cpu;
|
||||||
|
|
||||||
for ( cpu = 0 ; cpu < ncpus ; ++cpu ) {
|
for ( cpu = 0 ; cpu < ncpus ; ++cpu ) {
|
||||||
@@ -146,7 +146,7 @@ void _SMP_Broadcast_message( uint32_t message )
|
|||||||
void _SMP_Request_other_cores_to_perform_first_context_switch( void )
|
void _SMP_Request_other_cores_to_perform_first_context_switch( void )
|
||||||
{
|
{
|
||||||
int self = bsp_smp_processor_id();
|
int self = bsp_smp_processor_id();
|
||||||
int ncpus = _SMP_Processor_count;
|
int ncpus = _SMP_Get_processor_count();
|
||||||
int cpu;
|
int cpu;
|
||||||
|
|
||||||
for ( cpu = 0 ; cpu < ncpus ; ++cpu ) {
|
for ( cpu = 0 ; cpu < ncpus ; ++cpu ) {
|
||||||
@@ -165,7 +165,7 @@ void _SMP_Request_other_cores_to_dispatch( void )
|
|||||||
{
|
{
|
||||||
if ( _System_state_Is_up( _System_state_Get() ) ) {
|
if ( _System_state_Is_up( _System_state_Get() ) ) {
|
||||||
int self = bsp_smp_processor_id();
|
int self = bsp_smp_processor_id();
|
||||||
int ncpus = _SMP_Processor_count;
|
int ncpus = _SMP_Get_processor_count();
|
||||||
int cpu;
|
int cpu;
|
||||||
|
|
||||||
for ( cpu = 0 ; cpu < ncpus ; ++cpu ) {
|
for ( cpu = 0 ; cpu < ncpus ; ++cpu ) {
|
||||||
@@ -185,7 +185,7 @@ void _SMP_Request_other_cores_to_dispatch( void )
|
|||||||
void _SMP_Request_other_cores_to_shutdown( void )
|
void _SMP_Request_other_cores_to_shutdown( void )
|
||||||
{
|
{
|
||||||
int self = bsp_smp_processor_id();
|
int self = bsp_smp_processor_id();
|
||||||
int ncpus = _SMP_Processor_count;
|
int ncpus = _SMP_Get_processor_count();
|
||||||
int cpu;
|
int cpu;
|
||||||
|
|
||||||
_SMP_Broadcast_message( RTEMS_BSP_SMP_SHUTDOWN );
|
_SMP_Broadcast_message( RTEMS_BSP_SMP_SHUTDOWN );
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ void _Thread_Create_idle( void )
|
|||||||
#if defined(RTEMS_SMP)
|
#if defined(RTEMS_SMP)
|
||||||
int cpu;
|
int cpu;
|
||||||
|
|
||||||
for ( cpu=0 ; cpu < _SMP_Processor_count ; cpu++ ) {
|
for ( cpu=0 ; cpu < _SMP_Get_processor_count() ; cpu++ ) {
|
||||||
_Thread_Create_idle_helper(
|
_Thread_Create_idle_helper(
|
||||||
_Objects_Build_name( 'I', 'D', 'L', 'E' ),
|
_Objects_Build_name( 'I', 'D', 'L', 'E' ),
|
||||||
cpu
|
cpu
|
||||||
|
|||||||
@@ -44,12 +44,12 @@ rtems_task Init(
|
|||||||
locked_printf( "\n\n*** SMP01 TEST ***\n" );
|
locked_printf( "\n\n*** SMP01 TEST ***\n" );
|
||||||
|
|
||||||
/* Initialize the TaskRan array */
|
/* Initialize the TaskRan array */
|
||||||
for ( i=0; i<rtems_smp_get_number_of_processors() ; i++ ) {
|
for ( i=0; i<rtems_smp_get_processor_count() ; i++ ) {
|
||||||
TaskRan[i] = false;
|
TaskRan[i] = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Create and start tasks for each processor */
|
/* Create and start tasks for each processor */
|
||||||
for ( i=0; i< rtems_smp_get_number_of_processors() ; i++ ) {
|
for ( i=0; i< rtems_smp_get_processor_count() ; i++ ) {
|
||||||
if ( i != cpu_self ) {
|
if ( i != cpu_self ) {
|
||||||
ch = '0' + i;
|
ch = '0' + i;
|
||||||
|
|
||||||
@@ -74,7 +74,7 @@ rtems_task Init(
|
|||||||
/* Wait on the all tasks to run */
|
/* Wait on the all tasks to run */
|
||||||
while (1) {
|
while (1) {
|
||||||
allDone = true;
|
allDone = true;
|
||||||
for ( i=0; i<rtems_smp_get_number_of_processors() ; i++ ) {
|
for ( i=0; i<rtems_smp_get_processor_count() ; i++ ) {
|
||||||
if ( i != cpu_self && TaskRan[i] == false)
|
if ( i != cpu_self && TaskRan[i] == false)
|
||||||
allDone = false;
|
allDone = false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ rtems_task Init(
|
|||||||
status = rtems_semaphore_obtain( Semaphore, RTEMS_WAIT, 0);
|
status = rtems_semaphore_obtain( Semaphore, RTEMS_WAIT, 0);
|
||||||
directive_failed( status,"rtems_semaphore_obtain of SEM1\n");
|
directive_failed( status,"rtems_semaphore_obtain of SEM1\n");
|
||||||
|
|
||||||
for ( i=1; i < rtems_smp_get_number_of_processors(); i++ ){
|
for ( i=1; i < rtems_smp_get_processor_count(); i++ ){
|
||||||
|
|
||||||
/* Create and start tasks for each CPU */
|
/* Create and start tasks for each CPU */
|
||||||
ch = '0' + i;
|
ch = '0' + i;
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ rtems_task Init(
|
|||||||
|
|
||||||
/* Initialize the TaskRan array */
|
/* Initialize the TaskRan array */
|
||||||
TaskRan[0] = true;
|
TaskRan[0] = true;
|
||||||
for ( i=1; i<rtems_smp_get_number_of_processors() ; i++ ) {
|
for ( i=1; i<rtems_smp_get_processor_count() ; i++ ) {
|
||||||
TaskRan[i] = false;
|
TaskRan[i] = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -57,7 +57,7 @@ rtems_task Init(
|
|||||||
PrintTaskInfo( "Init" );
|
PrintTaskInfo( "Init" );
|
||||||
|
|
||||||
/* for each remaining cpu create and start a task */
|
/* for each remaining cpu create and start a task */
|
||||||
for ( i=1; i < rtems_smp_get_number_of_processors(); i++ ){
|
for ( i=1; i < rtems_smp_get_processor_count(); i++ ){
|
||||||
|
|
||||||
ch = '0' + i;
|
ch = '0' + i;
|
||||||
|
|
||||||
@@ -87,12 +87,12 @@ rtems_task Init(
|
|||||||
RTEMS_DEFAULT_ATTRIBUTES,
|
RTEMS_DEFAULT_ATTRIBUTES,
|
||||||
&id
|
&id
|
||||||
);
|
);
|
||||||
status = rtems_task_start(id,Test_task,rtems_smp_get_number_of_processors());
|
status = rtems_task_start(id,Test_task,rtems_smp_get_processor_count());
|
||||||
|
|
||||||
/* Wait on all tasks to run */
|
/* Wait on all tasks to run */
|
||||||
while (1) {
|
while (1) {
|
||||||
TestFinished = true;
|
TestFinished = true;
|
||||||
for ( i=1; i < (rtems_smp_get_number_of_processors()+1) ; i++ ) {
|
for ( i=1; i < (rtems_smp_get_processor_count()+1) ; i++ ) {
|
||||||
if (TaskRan[i] == false)
|
if (TaskRan[i] == false)
|
||||||
TestFinished = false;
|
TestFinished = false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ rtems_task Init(
|
|||||||
|
|
||||||
/* Set all Tasks to not ran except for the init task */
|
/* Set all Tasks to not ran except for the init task */
|
||||||
TaskRan[0] = true;
|
TaskRan[0] = true;
|
||||||
for ( i=1; i <= rtems_smp_get_number_of_processors() ; i++ )
|
for ( i=1; i <= rtems_smp_get_processor_count() ; i++ )
|
||||||
TaskRan[i] = false;
|
TaskRan[i] = false;
|
||||||
|
|
||||||
|
|
||||||
@@ -66,7 +66,7 @@ rtems_task Init(
|
|||||||
* For each processor create and start a task alternating
|
* For each processor create and start a task alternating
|
||||||
* between RTEMS_PREEMPT and RTEMS_NO_PREEMPT.
|
* between RTEMS_PREEMPT and RTEMS_NO_PREEMPT.
|
||||||
*/
|
*/
|
||||||
for ( i=1; i < rtems_smp_get_number_of_processors() ; i++ ){
|
for ( i=1; i < rtems_smp_get_processor_count() ; i++ ){
|
||||||
|
|
||||||
/* Create and start tasks for each CPU */
|
/* Create and start tasks for each CPU */
|
||||||
ch = '0' + i;
|
ch = '0' + i;
|
||||||
@@ -79,7 +79,7 @@ rtems_task Init(
|
|||||||
status = rtems_task_create(
|
status = rtems_task_create(
|
||||||
rtems_build_name( 'T', 'A', ch, ' ' ),
|
rtems_build_name( 'T', 'A', ch, ' ' ),
|
||||||
CONFIGURE_INIT_TASK_PRIORITY +
|
CONFIGURE_INIT_TASK_PRIORITY +
|
||||||
(2*rtems_smp_get_number_of_processors()) - (2*i),
|
(2*rtems_smp_get_processor_count()) - (2*i),
|
||||||
RTEMS_MINIMUM_STACK_SIZE,
|
RTEMS_MINIMUM_STACK_SIZE,
|
||||||
((i%2) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT),
|
((i%2) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT),
|
||||||
RTEMS_DEFAULT_ATTRIBUTES,
|
RTEMS_DEFAULT_ATTRIBUTES,
|
||||||
@@ -106,7 +106,7 @@ rtems_task Init(
|
|||||||
* should preempt the longest running PREEMPTABLE
|
* should preempt the longest running PREEMPTABLE
|
||||||
* task and run on that cpu.
|
* task and run on that cpu.
|
||||||
*/
|
*/
|
||||||
ch = '0' + rtems_smp_get_number_of_processors() ;
|
ch = '0' + rtems_smp_get_processor_count() ;
|
||||||
locked_printf(
|
locked_printf(
|
||||||
"Create a TA%c a %s task\n",
|
"Create a TA%c a %s task\n",
|
||||||
ch,
|
ch,
|
||||||
@@ -128,7 +128,7 @@ rtems_task Init(
|
|||||||
status = rtems_task_start(
|
status = rtems_task_start(
|
||||||
id,
|
id,
|
||||||
Test_task,
|
Test_task,
|
||||||
rtems_smp_get_number_of_processors()
|
rtems_smp_get_processor_count()
|
||||||
);
|
);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -136,7 +136,7 @@ rtems_task Init(
|
|||||||
*/
|
*/
|
||||||
while (1) {
|
while (1) {
|
||||||
allDone = true;
|
allDone = true;
|
||||||
for ( i=1; i<=rtems_smp_get_number_of_processors() ; i++ ) {
|
for ( i=1; i<=rtems_smp_get_processor_count() ; i++ ) {
|
||||||
if (TaskRan[i] == false)
|
if (TaskRan[i] == false)
|
||||||
allDone = false;
|
allDone = false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ rtems_task Init(
|
|||||||
locked_print_initialize();
|
locked_print_initialize();
|
||||||
locked_printf( "\n\n*** TEST SMP05 ***\n" );
|
locked_printf( "\n\n*** TEST SMP05 ***\n" );
|
||||||
|
|
||||||
for ( i=0; i<rtems_smp_get_number_of_processors() ; i++ ) {
|
for ( i=0; i<rtems_smp_get_processor_count() ; i++ ) {
|
||||||
ch = '1' + i;
|
ch = '1' + i;
|
||||||
|
|
||||||
status = rtems_task_create(
|
status = rtems_task_create(
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ rtems_task Init(
|
|||||||
status = rtems_clock_tick();
|
status = rtems_clock_tick();
|
||||||
directive_failed( status, "clock tick" );
|
directive_failed( status, "clock tick" );
|
||||||
|
|
||||||
rtems_test_assert( rtems_smp_get_number_of_processors() > 1 );
|
rtems_test_assert( rtems_smp_get_processor_count() > 1 );
|
||||||
|
|
||||||
cpu_num = bsp_smp_processor_id();
|
cpu_num = bsp_smp_processor_id();
|
||||||
|
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ rtems_task Init(
|
|||||||
/* Show that the init task is running on this cpu */
|
/* Show that the init task is running on this cpu */
|
||||||
PrintTaskInfo( "Init", &time );
|
PrintTaskInfo( "Init", &time );
|
||||||
|
|
||||||
for ( i=1; i <= rtems_smp_get_number_of_processors() *3; i++ ) {
|
for ( i=1; i <= rtems_smp_get_processor_count() *3; i++ ) {
|
||||||
|
|
||||||
sprintf(ch, "%02" PRId32, i );
|
sprintf(ch, "%02" PRId32, i );
|
||||||
status = rtems_task_create(
|
status = rtems_task_create(
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ rtems_task Init(
|
|||||||
for ( killtime=0; killtime<1000000; killtime++ )
|
for ( killtime=0; killtime<1000000; killtime++ )
|
||||||
;
|
;
|
||||||
|
|
||||||
for ( i=0; i<rtems_smp_get_number_of_processors() -1; i++ ) {
|
for ( i=0; i<rtems_smp_get_processor_count() -1; i++ ) {
|
||||||
ch = '1' + i;
|
ch = '1' + i;
|
||||||
|
|
||||||
status = rtems_task_create(
|
status = rtems_task_create(
|
||||||
|
|||||||
@@ -35,12 +35,12 @@ rtems_task Init(
|
|||||||
locked_printf( "\n\n*** SMPatomic01 TEST ***\n" );
|
locked_printf( "\n\n*** SMPatomic01 TEST ***\n" );
|
||||||
|
|
||||||
/* Initialize the TaskRan array */
|
/* Initialize the TaskRan array */
|
||||||
for ( i=0; i<rtems_smp_get_number_of_processors() ; i++ ) {
|
for ( i=0; i<rtems_smp_get_processor_count() ; i++ ) {
|
||||||
TaskRan[i] = false;
|
TaskRan[i] = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Create and start tasks for each processor */
|
/* Create and start tasks for each processor */
|
||||||
for ( i=1; i< rtems_smp_get_number_of_processors() ; i++ ) {
|
for ( i=1; i< rtems_smp_get_processor_count() ; i++ ) {
|
||||||
ch = '0' + i;
|
ch = '0' + i;
|
||||||
|
|
||||||
status = rtems_task_create(
|
status = rtems_task_create(
|
||||||
@@ -60,7 +60,7 @@ rtems_task Init(
|
|||||||
/* Wait on the all tasks to run */
|
/* Wait on the all tasks to run */
|
||||||
while (1) {
|
while (1) {
|
||||||
allDone = true;
|
allDone = true;
|
||||||
for ( i=1; i<rtems_smp_get_number_of_processors() ; i++ ) {
|
for ( i=1; i<rtems_smp_get_processor_count() ; i++ ) {
|
||||||
if (TaskRan[i] == false)
|
if (TaskRan[i] == false)
|
||||||
allDone = false;
|
allDone = false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,12 +35,12 @@ rtems_task Init(
|
|||||||
locked_printf( "\n\n*** SMPatomic02 TEST ***\n" );
|
locked_printf( "\n\n*** SMPatomic02 TEST ***\n" );
|
||||||
|
|
||||||
/* Initialize the TaskRan array */
|
/* Initialize the TaskRan array */
|
||||||
for ( i=0; i<rtems_smp_get_number_of_processors() ; i++ ) {
|
for ( i=0; i<rtems_smp_get_processor_count() ; i++ ) {
|
||||||
TaskRan[i] = false;
|
TaskRan[i] = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Create and start tasks for each processor */
|
/* Create and start tasks for each processor */
|
||||||
for ( i=1; i< rtems_smp_get_number_of_processors() ; i++ ) {
|
for ( i=1; i< rtems_smp_get_processor_count() ; i++ ) {
|
||||||
ch = '0' + i;
|
ch = '0' + i;
|
||||||
|
|
||||||
status = rtems_task_create(
|
status = rtems_task_create(
|
||||||
@@ -60,7 +60,7 @@ rtems_task Init(
|
|||||||
/* Wait on the all tasks to run */
|
/* Wait on the all tasks to run */
|
||||||
while (1) {
|
while (1) {
|
||||||
allDone = true;
|
allDone = true;
|
||||||
for ( i=1; i<rtems_smp_get_number_of_processors() ; i++ ) {
|
for ( i=1; i<rtems_smp_get_processor_count() ; i++ ) {
|
||||||
if (TaskRan[i] == false)
|
if (TaskRan[i] == false)
|
||||||
allDone = false;
|
allDone = false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,12 +35,12 @@ rtems_task Init(
|
|||||||
locked_printf( "\n\n*** SMPatomic03 TEST ***\n" );
|
locked_printf( "\n\n*** SMPatomic03 TEST ***\n" );
|
||||||
|
|
||||||
/* Initialize the TaskRan array */
|
/* Initialize the TaskRan array */
|
||||||
for ( i=0; i<rtems_smp_get_number_of_processors() ; i++ ) {
|
for ( i=0; i<rtems_smp_get_processor_count() ; i++ ) {
|
||||||
TaskRan[i] = false;
|
TaskRan[i] = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Create and start tasks for each processor */
|
/* Create and start tasks for each processor */
|
||||||
for ( i=1; i< rtems_smp_get_number_of_processors() ; i++ ) {
|
for ( i=1; i< rtems_smp_get_processor_count() ; i++ ) {
|
||||||
ch = '0' + i;
|
ch = '0' + i;
|
||||||
|
|
||||||
status = rtems_task_create(
|
status = rtems_task_create(
|
||||||
@@ -60,7 +60,7 @@ rtems_task Init(
|
|||||||
/* Wait on the all tasks to run */
|
/* Wait on the all tasks to run */
|
||||||
while (1) {
|
while (1) {
|
||||||
allDone = true;
|
allDone = true;
|
||||||
for ( i=1; i<rtems_smp_get_number_of_processors() ; i++ ) {
|
for ( i=1; i<rtems_smp_get_processor_count() ; i++ ) {
|
||||||
if (TaskRan[i] == false)
|
if (TaskRan[i] == false)
|
||||||
allDone = false;
|
allDone = false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,12 +35,12 @@ rtems_task Init(
|
|||||||
locked_printf( "\n\n*** SMPatomic04 TEST ***\n" );
|
locked_printf( "\n\n*** SMPatomic04 TEST ***\n" );
|
||||||
|
|
||||||
/* Initialize the TaskRan array */
|
/* Initialize the TaskRan array */
|
||||||
for ( i=0; i<rtems_smp_get_number_of_processors() ; i++ ) {
|
for ( i=0; i<rtems_smp_get_processor_count() ; i++ ) {
|
||||||
TaskRan[i] = false;
|
TaskRan[i] = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Create and start tasks for each processor */
|
/* Create and start tasks for each processor */
|
||||||
for ( i=1; i< rtems_smp_get_number_of_processors() ; i++ ) {
|
for ( i=1; i< rtems_smp_get_processor_count() ; i++ ) {
|
||||||
ch = '0' + i;
|
ch = '0' + i;
|
||||||
|
|
||||||
status = rtems_task_create(
|
status = rtems_task_create(
|
||||||
@@ -60,7 +60,7 @@ rtems_task Init(
|
|||||||
/* Wait on the all tasks to run */
|
/* Wait on the all tasks to run */
|
||||||
while (1) {
|
while (1) {
|
||||||
allDone = true;
|
allDone = true;
|
||||||
for ( i=1; i<rtems_smp_get_number_of_processors() ; i++ ) {
|
for ( i=1; i<rtems_smp_get_processor_count() ; i++ ) {
|
||||||
if (TaskRan[i] == false)
|
if (TaskRan[i] == false)
|
||||||
allDone = false;
|
allDone = false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,12 +35,12 @@ rtems_task Init(
|
|||||||
locked_printf( "\n\n*** SMPatomic05 TEST ***\n" );
|
locked_printf( "\n\n*** SMPatomic05 TEST ***\n" );
|
||||||
|
|
||||||
/* Initialize the TaskRan array */
|
/* Initialize the TaskRan array */
|
||||||
for ( i=0; i<rtems_smp_get_number_of_processors() ; i++ ) {
|
for ( i=0; i<rtems_smp_get_processor_count() ; i++ ) {
|
||||||
TaskRan[i] = false;
|
TaskRan[i] = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Create and start tasks for each processor */
|
/* Create and start tasks for each processor */
|
||||||
for ( i=1; i< rtems_smp_get_number_of_processors() ; i++ ) {
|
for ( i=1; i< rtems_smp_get_processor_count() ; i++ ) {
|
||||||
ch = '0' + i;
|
ch = '0' + i;
|
||||||
|
|
||||||
status = rtems_task_create(
|
status = rtems_task_create(
|
||||||
@@ -60,7 +60,7 @@ rtems_task Init(
|
|||||||
/* Wait on the all tasks to run */
|
/* Wait on the all tasks to run */
|
||||||
while (1) {
|
while (1) {
|
||||||
allDone = true;
|
allDone = true;
|
||||||
for ( i=1; i<rtems_smp_get_number_of_processors() ; i++ ) {
|
for ( i=1; i<rtems_smp_get_processor_count() ; i++ ) {
|
||||||
if (TaskRan[i] == false)
|
if (TaskRan[i] == false)
|
||||||
allDone = false;
|
allDone = false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,12 +35,12 @@ rtems_task Init(
|
|||||||
locked_printf( "\n\n*** SMPatomic06 TEST ***\n" );
|
locked_printf( "\n\n*** SMPatomic06 TEST ***\n" );
|
||||||
|
|
||||||
/* Initialize the TaskRan array */
|
/* Initialize the TaskRan array */
|
||||||
for ( i=0; i<rtems_smp_get_number_of_processors() ; i++ ) {
|
for ( i=0; i<rtems_smp_get_processor_count() ; i++ ) {
|
||||||
TaskRan[i] = false;
|
TaskRan[i] = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Create and start tasks for each processor */
|
/* Create and start tasks for each processor */
|
||||||
for ( i=1; i< rtems_smp_get_number_of_processors() ; i++ ) {
|
for ( i=1; i< rtems_smp_get_processor_count() ; i++ ) {
|
||||||
ch = '0' + i;
|
ch = '0' + i;
|
||||||
|
|
||||||
status = rtems_task_create(
|
status = rtems_task_create(
|
||||||
@@ -60,7 +60,7 @@ rtems_task Init(
|
|||||||
/* Wait on the all tasks to run */
|
/* Wait on the all tasks to run */
|
||||||
while (1) {
|
while (1) {
|
||||||
allDone = true;
|
allDone = true;
|
||||||
for ( i=1; i<rtems_smp_get_number_of_processors() ; i++ ) {
|
for ( i=1; i<rtems_smp_get_processor_count() ; i++ ) {
|
||||||
if (TaskRan[i] == false)
|
if (TaskRan[i] == false)
|
||||||
allDone = false;
|
allDone = false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,12 +35,12 @@ rtems_task Init(
|
|||||||
locked_printf( "\n\n*** SMPatomic07 TEST ***\n" );
|
locked_printf( "\n\n*** SMPatomic07 TEST ***\n" );
|
||||||
|
|
||||||
/* Initialize the TaskRan array */
|
/* Initialize the TaskRan array */
|
||||||
for ( i=0; i<rtems_smp_get_number_of_processors() ; i++ ) {
|
for ( i=0; i<rtems_smp_get_processor_count() ; i++ ) {
|
||||||
TaskRan[i] = false;
|
TaskRan[i] = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Create and start tasks for each processor */
|
/* Create and start tasks for each processor */
|
||||||
for ( i=1; i< rtems_smp_get_number_of_processors() ; i++ ) {
|
for ( i=1; i< rtems_smp_get_processor_count() ; i++ ) {
|
||||||
ch = '0' + i;
|
ch = '0' + i;
|
||||||
|
|
||||||
status = rtems_task_create(
|
status = rtems_task_create(
|
||||||
@@ -60,7 +60,7 @@ rtems_task Init(
|
|||||||
/* Wait on the all tasks to run */
|
/* Wait on the all tasks to run */
|
||||||
while (1) {
|
while (1) {
|
||||||
allDone = true;
|
allDone = true;
|
||||||
for ( i=1; i<rtems_smp_get_number_of_processors() ; i++ ) {
|
for ( i=1; i<rtems_smp_get_processor_count() ; i++ ) {
|
||||||
if (TaskRan[i] == false)
|
if (TaskRan[i] == false)
|
||||||
allDone = false;
|
allDone = false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -298,7 +298,7 @@ static void run_tests(
|
|||||||
static void task(rtems_task_argument arg)
|
static void task(rtems_task_argument arg)
|
||||||
{
|
{
|
||||||
global_context *ctx = (global_context *) arg;
|
global_context *ctx = (global_context *) arg;
|
||||||
int cpu_count = (int) rtems_smp_get_number_of_processors();
|
int cpu_count = (int) rtems_smp_get_processor_count();
|
||||||
int cpu_self = rtems_smp_get_current_processor();
|
int cpu_self = rtems_smp_get_current_processor();
|
||||||
rtems_status_code sc;
|
rtems_status_code sc;
|
||||||
barrier_state bs = BARRIER_STATE_INITIALIZER;
|
barrier_state bs = BARRIER_STATE_INITIALIZER;
|
||||||
@@ -312,7 +312,7 @@ static void task(rtems_task_argument arg)
|
|||||||
static void test(void)
|
static void test(void)
|
||||||
{
|
{
|
||||||
global_context *ctx = &context;
|
global_context *ctx = &context;
|
||||||
int cpu_count = (int) rtems_smp_get_number_of_processors();
|
int cpu_count = (int) rtems_smp_get_processor_count();
|
||||||
int cpu_self = rtems_smp_get_current_processor();
|
int cpu_self = rtems_smp_get_current_processor();
|
||||||
int cpu;
|
int cpu;
|
||||||
int test;
|
int test;
|
||||||
|
|||||||
@@ -341,11 +341,7 @@ uninitialized =
|
|||||||
/*partmp.h*/ 0 +
|
/*partmp.h*/ 0 +
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(RTEMS_SMP)
|
/*percpu.h*/ (_SMP_Get_processor_count() * sizeof(Per_CPU_Control)) +
|
||||||
/*percpu.h*/ (_SMP_Processor_count * sizeof(Per_CPU_Control)) +
|
|
||||||
#else
|
|
||||||
/*percpu.h*/ (sizeof (Per_CPU_Control) ) +
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*ratemon.h*/ (sizeof _Rate_monotonic_Information) +
|
/*ratemon.h*/ (sizeof _Rate_monotonic_Information) +
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user