Changeset 39e51758 in rtems


Ignore:
Timestamp:
Jun 14, 2013, 12:00:38 PM (6 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
ca63ae2
Parents:
a7ce0ce
git-author:
Sebastian Huber <sebastian.huber@…> (06/14/13 12:00:38)
git-committer:
Sebastian Huber <sebastian.huber@…> (07/17/13 11:09:49)
Message:

smp: Add and use _CPU_SMP_Get_current_processor()

Add and use _SMP_Get_current_processor() and
rtems_smp_get_current_processor().

Delete bsp_smp_interrupt_cpu().

Change type of current processor index from int to uint32_t to match
_SMP_Processor_count type.

Files:
41 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/arm/shared/arm-a9mpcore-smp.c

    ra7ce0ce r39e51758  
    2020
    2121#include <bsp/irq.h>
    22 
    23 int bsp_smp_processor_id(void)
    24 {
    25   return (int) arm_cortex_a9_get_multiprocessor_cpu_id();
    26 }
    2722
    2823static void ipi_handler(void *arg)
  • c/src/lib/libbsp/i386/shared/irq/irq_asm.S

    ra7ce0ce r39e51758  
    101101#if defined(RTEMS_SMP) && defined(BSP_HAS_SMP)
    102102        movl     $SYM(_Per_CPU_Information_p), ebx
    103         call     SYM(bsp_smp_processor_id)
     103        call     SYM(_CPU_SMP_Get_current_processor)
    104104        mov      (ebx,eax,4), ebx
    105105        pushl    ecx
  • c/src/lib/libbsp/i386/shared/smp/getcpuid.c

    ra7ce0ce r39e51758  
    88 */
    99
     10#include <rtems/score/cpu.h>
     11
    1012#include <bsp/apic.h>
    1113#include <bsp/smp-imps.h>
     
    1416unsigned imps_lapic_addr = ((unsigned)(&lapic_dummy)) - LAPIC_ID;
    1517
    16 int  bsp_smp_processor_id(void)
     18uint32_t _CPU_SMP_Get_current_processor( void )
    1719{
    1820  return APIC_ID(IMPS_LAPIC_READ(LAPIC_ID));
  • c/src/lib/libbsp/powerpc/qoriq/startup/smp.c

    ra7ce0ce r39e51758  
    4343
    4444#define TLB_COUNT (TLB_END - TLB_BEGIN)
    45 
    46 int bsp_smp_processor_id(void)
    47 {
    48   return (int) ppc_processor_id();
    49 }
    5045
    5146/*
  • c/src/lib/libbsp/shared/smp/getcpuid.c

    ra7ce0ce r39e51758  
    88 */
    99
    10 int bsp_smp_processor_id(void)
     10#include <rtems/score/cpu.h>
     11
     12uint32_t _CPU_SMP_Get_current_processor( void )
    1113{
    1214  return 0;
    1315}
    14 
  • c/src/lib/libbsp/sparc/leon3/smp/getcpuid.c

    ra7ce0ce r39e51758  
    1414 */
    1515
    16 int bsp_smp_processor_id(void)
     16#include <rtems/score/cpu.h>
     17
     18uint32_t _CPU_SMP_Get_current_processor( void )
    1719{
    18   unsigned int id;
     20  uint32_t id;
    1921  __asm__ __volatile__( "rd     %%asr17,%0\n\t" : "=r" (id) : );
    2022
  • c/src/lib/libbsp/sparc/leon3/smp/smp_leon3.c

    ra7ce0ce r39e51758  
    4444static void leon3_secondary_cpu_initialize(void)
    4545{
    46   int cpu = bsp_smp_processor_id();
     46  uint32_t cpu = rtems_smp_get_current_processor();
    4747
    4848  sparc_leon3_set_cctrl( 0x80000F );
     
    126126void bsp_smp_broadcast_interrupt(void)
    127127{
    128   int dest_cpu;
    129   int cpu;
    130   int max_cpus;
     128  uint32_t dest_cpu;
     129  uint32_t cpu;
     130  uint32_t max_cpus;
    131131
    132   cpu = bsp_smp_processor_id();
     132  cpu = rtems_smp_get_current_processor();
    133133  max_cpus = rtems_smp_get_processor_count();
    134134
  • cpukit/rtems/include/rtems.h

    ra7ce0ce r39e51758  
    7676#include <rtems/rtems/smp.h>
    7777
    78 
    7978#include <rtems/rtems/support.h>
    8079#include <rtems/score/sysstate.h>
  • cpukit/rtems/include/rtems/rtems/smp.h

    ra7ce0ce r39e51758  
    5656
    5757/**
    58  * @brief Obtain Current Core Number
     58 * @brief Returns the index of the current processor.
    5959 *
    60  * This method returns the id of the current CPU core.
     60 * On uni-processor configurations this is a compile time constant and defined
     61 * to be zero.
    6162 *
    62  * @retval This method returns the id of the current CPU core.
     63 * On SMP configurations an architecture specific method is used to obtain the
     64 * index of the current processor in the system.  The set of processor indices
     65 * is the range of integers starting with zero up to the processor count minus
     66 * one.
     67 *
     68 * Outside of sections with disabled thread dispatching the current processor
     69 * index may change after every instruction since the thread may migrate from
     70 * one processor to another.  Sections with disabled interrupts are sections
     71 * with thread dispatching disabled.
     72 *
     73 * @return The index of the current processor.
    6374 */
    6475#define rtems_smp_get_current_processor() \
    65     bsp_smp_processor_id()
     76  _SMP_Get_current_processor()
    6677
    6778/** @} */
  • cpukit/score/cpu/arm/rtems/score/cpu.h

    ra7ce0ce r39e51758  
    443443  #define _CPU_Context_switch_to_first_task_smp( _context ) \
    444444    _CPU_Context_restore( _context )
     445
     446  RTEMS_COMPILER_PURE_ATTRIBUTE static inline uint32_t
     447    _CPU_SMP_Get_current_processor( void )
     448  {
     449    uint32_t mpidr;
     450
     451    /* Use ARMv7 Multiprocessor Affinity Register (MPIDR) */
     452    __asm__ volatile (
     453      "mrc p15, 0, %[mpidr], c0, c0, 5\n"
     454      : [mpidr] "=&r" (mpidr)
     455    );
     456
     457    return mpidr & 0xffU;
     458  }
    445459
    446460  static inline void _ARM_Data_memory_barrier( void )
  • cpukit/score/cpu/i386/rtems/score/cpu.h

    ra7ce0ce r39e51758  
    456456     _CPU_Context_restore( (_the_context) );
    457457
     458  RTEMS_COMPILER_PURE_ATTRIBUTE uint32_t _CPU_SMP_Get_current_processor( void );
     459
    458460  static inline void _CPU_Processor_event_broadcast( void )
    459461  {
  • cpukit/score/cpu/no_cpu/rtems/score/cpu.h

    ra7ce0ce r39e51758  
    14041404
    14051405#ifdef RTEMS_SMP
     1406  /**
     1407   * @brief Returns the index of the current processor.
     1408   *
     1409   * An architecture specific method must be used to obtain the index of the
     1410   * current processor in the system.  The set of processor indices is the
     1411   * range of integers starting with zero up to the processor count minus one.
     1412   */
     1413  RTEMS_COMPILER_PURE_ATTRIBUTE static inline uint32_t
     1414    _CPU_SMP_Get_current_processor( void )
     1415  {
     1416    return 123;
     1417  }
     1418
    14061419  /**
    14071420   * @brief Broadcasts a processor event.
  • cpukit/score/cpu/powerpc/rtems/score/cpu.h

    ra7ce0ce r39e51758  
    10001000  #define _CPU_Context_switch_to_first_task_smp( _context ) \
    10011001    _CPU_Context_restore( _context )
     1002
     1003  RTEMS_COMPILER_PURE_ATTRIBUTE static inline uint32_t
     1004    _CPU_SMP_Get_current_processor( void )
     1005  {
     1006    uint32_t pir;
     1007
     1008    /* Use Book E Processor ID Register (PIR) */
     1009    __asm__ volatile (
     1010      "mfspr %[pir], 286"
     1011      : [pir] "=&r" (pir)
     1012    );
     1013
     1014    return pir;
     1015  }
     1016
    10021017
    10031018  static inline void _CPU_Processor_event_broadcast( void )
  • cpukit/score/cpu/sparc/rtems/score/cpu.h

    ra7ce0ce r39e51758  
    11871187  );
    11881188
     1189  RTEMS_COMPILER_PURE_ATTRIBUTE uint32_t _CPU_SMP_Get_current_processor( void );
     1190
    11891191  static inline void _CPU_Processor_event_broadcast( void )
    11901192  {
  • cpukit/score/include/rtems/bspsmp.h

    ra7ce0ce r39e51758  
    7171
    7272/**
    73  *  @brief Obtain current CPU index.
    74  *
    75  *  This method is invoked by RTEMS when it needs to know the index
    76  *  of the CPU it is executing on.
    77  *
    78  *  @retval This method returns the current CPU index.
    79  */
    80 int bsp_smp_processor_id(void) RTEMS_COMPILER_PURE_ATTRIBUTE;
    81 
    82 /**
    8373 *  @brief Generate an interprocessor broadcast interrupt.
    8474 *
     
    10595  int cpu
    10696);
    107 
    108 /**
    109  *  @brief Obtain CPU core number.
    110  *
    111  *  This method is invoked by RTEMS when it needs to know which core
    112  *  number it is executing on.  This is used when it needs to perform
    113  *  some action or bookkeeping and needs to distinguish itself from
    114  *  the other cores.  For example, it may need to realize it needs to
    115  *  preempt a thread on another node.
    116  *
    117  *  @retval This method returns the Id of the current CPU core.
    118  */
    119 int   bsp_smp_processor_id( void );
    12097
    12198/**
     
    157134#endif
    158135
    159 #else
    160   #define bsp_smp_processor_id()  0
    161136#endif
    162137
  • cpukit/score/include/rtems/score/percpu.h

    ra7ce0ce r39e51758  
    2626  #include <rtems/score/timestamp.h>
    2727  #include <rtems/score/smplock.h>
    28 
    29   /*
    30    * NOTE: This file MUST be included on non-smp systems as well
    31    *       in order to define bsp_smp_processor_id.
    32    */
    33   #include <rtems/bspsmp.h>
     28  #include <rtems/score/smp.h>
    3429#endif
    3530
     
    278273
    279274/*
    280  * On a non SMP system, the bsp_smp_processor_id is defined to 0.
     275 * On a non SMP system, the _SMP_Get_current_processor() is defined to 0.
    281276 * Thus when built for non-SMP, there should be no performance penalty.
    282277 */
    283278#define _Thread_Heir \
    284   _Per_CPU_Information[bsp_smp_processor_id()].heir
     279  _Per_CPU_Information[_SMP_Get_current_processor()].heir
    285280#define _Thread_Executing \
    286   _Per_CPU_Information[bsp_smp_processor_id()].executing
     281  _Per_CPU_Information[_SMP_Get_current_processor()].executing
    287282#define _ISR_Nest_level \
    288   _Per_CPU_Information[bsp_smp_processor_id()].isr_nest_level
     283  _Per_CPU_Information[_SMP_Get_current_processor()].isr_nest_level
    289284#define _CPU_Interrupt_stack_low \
    290   _Per_CPU_Information[bsp_smp_processor_id()].interrupt_stack_low
     285  _Per_CPU_Information[_SMP_Get_current_processor()].interrupt_stack_low
    291286#define _CPU_Interrupt_stack_high \
    292   _Per_CPU_Information[bsp_smp_processor_id()].interrupt_stack_high
     287  _Per_CPU_Information[_SMP_Get_current_processor()].interrupt_stack_high
    293288#define _Thread_Dispatch_necessary \
    294   _Per_CPU_Information[bsp_smp_processor_id()].dispatch_necessary
     289  _Per_CPU_Information[_SMP_Get_current_processor()].dispatch_necessary
    295290#define _Thread_Time_of_last_context_switch \
    296   _Per_CPU_Information[bsp_smp_processor_id()].time_of_last_context_switch
     291  _Per_CPU_Information[_SMP_Get_current_processor()].time_of_last_context_switch
    297292
    298293#endif  /* ASM */
  • cpukit/score/include/rtems/score/smp.h

    ra7ce0ce r39e51758  
    7272 *  @param[in] message The message.
    7373 */
    74 void _SMP_Send_message( int cpu, uint32_t message );
     74void _SMP_Send_message( uint32_t cpu, uint32_t message );
    7575
    7676/**
     
    117117/** @} */
    118118
     119#if defined( RTEMS_SMP )
     120  RTEMS_COMPILER_PURE_ATTRIBUTE static inline uint32_t
     121    _SMP_Get_current_processor( void )
     122  {
     123    return _CPU_SMP_Get_current_processor();
     124  }
     125#else
     126  #define _SMP_Get_current_processor() ( ( uint32_t ) 0 )
     127#endif
     128
    119129#ifdef __cplusplus
    120130}
  • cpukit/score/include/rtems/score/threaddispatch.h

    ra7ce0ce r39e51758  
    6363  typedef struct {
    6464    SMP_lock_Control lock;
    65     int owner_cpu;
    66     int nest_level;
     65    uint32_t owner_cpu;
     66    uint32_t nest_level;
    6767  } Thread_Dispatch_disable_level_lock_control;
    6868
  • cpukit/score/src/smp.c

    ra7ce0ce r39e51758  
    3131void rtems_smp_secondary_cpu_initialize( void )
    3232{
    33   int              self = bsp_smp_processor_id();
     33  uint32_t         self = _SMP_Get_current_processor();
    3434  Per_CPU_Control *per_cpu = &_Per_CPU_Information[ self ];
    3535  Thread_Control  *heir;
     
    6868void rtems_smp_process_interrupt( void )
    6969{
    70   int              self = bsp_smp_processor_id();
     70  uint32_t         self = _SMP_Get_current_processor();
    7171  Per_CPU_Control *per_cpu = &_Per_CPU_Information[ self ];
    7272
     
    108108}
    109109
    110 void _SMP_Send_message( int cpu, uint32_t message )
     110void _SMP_Send_message( uint32_t cpu, uint32_t message )
    111111{
    112112  Per_CPU_Control *per_cpu = &_Per_CPU_Information[ cpu ];
     
    127127void _SMP_Broadcast_message( uint32_t message )
    128128{
    129   int self = bsp_smp_processor_id();
    130   int ncpus = _SMP_Get_processor_count();
    131   int cpu;
     129  uint32_t self = _SMP_Get_current_processor();
     130  uint32_t ncpus = _SMP_Get_processor_count();
     131  uint32_t cpu;
    132132
    133133  for ( cpu = 0 ; cpu < ncpus ; ++cpu ) {
     
    147147void _SMP_Request_other_cores_to_perform_first_context_switch( void )
    148148{
    149   int self = bsp_smp_processor_id();
    150   int ncpus = _SMP_Get_processor_count();
    151   int cpu;
     149  uint32_t self = _SMP_Get_current_processor();
     150  uint32_t ncpus = _SMP_Get_processor_count();
     151  uint32_t cpu;
    152152
    153153  for ( cpu = 0 ; cpu < ncpus ; ++cpu ) {
     
    166166{
    167167  if ( _System_state_Is_up( _System_state_Get() ) ) {
    168     int self = bsp_smp_processor_id();
    169     int ncpus = _SMP_Get_processor_count();
    170     int cpu;
     168    uint32_t self = _SMP_Get_current_processor();
     169    uint32_t ncpus = _SMP_Get_processor_count();
     170    uint32_t cpu;
    171171
    172172    for ( cpu = 0 ; cpu < ncpus ; ++cpu ) {
     
    186186void _SMP_Request_other_cores_to_shutdown( void )
    187187{
    188   int self = bsp_smp_processor_id();
    189   int ncpus = _SMP_Get_processor_count();
    190   int cpu;
     188  uint32_t self = _SMP_Get_current_processor();
     189  uint32_t ncpus = _SMP_Get_processor_count();
     190  uint32_t cpu;
    191191
    192192  _SMP_Broadcast_message( RTEMS_BSP_SMP_SHUTDOWN );
  • cpukit/score/src/threaddispatchdisablelevel.c

    ra7ce0ce r39e51758  
    2727#include <rtems/score/threaddispatch.h>
    2828
    29 #define NO_OWNER_CPU (-1)
     29#define NO_OWNER_CPU 0xffffffffU
    3030
    3131void _Thread_Dispatch_initialization( void )
     
    4949  Thread_Dispatch_disable_level_lock_control *level_lock =
    5050    &_Thread_Dispatch_disable_level_lock;
    51   int self_cpu;
    5251  ISR_Level isr_level;
     52  uint32_t self_cpu;
    5353  uint32_t disable_level;
    5454
     
    5959   * non-optimizing compiler may store the value on the stack and read it back.
    6060   */
    61   self_cpu = bsp_smp_processor_id();
     61  self_cpu = _SMP_Get_current_processor();
    6262
    6363  if ( level_lock->owner_cpu != self_cpu ) {
  • testsuites/smptests/smp01/init.c

    ra7ce0ce r39e51758  
    1515#include "system.h"
    1616
     17#include <inttypes.h>
     18
    1719void Loop() {
    1820  volatile int i;
     
    2527)
    2628{
    27   int                i;
     29  uint32_t           i;
    2830  char               ch;
    29   int                cpu_self;
     31  uint32_t           cpu_self;
    3032  rtems_id           id;
    3133  rtems_status_code  status;
    3234  bool               allDone;
    3335
    34   cpu_self = bsp_smp_processor_id();
     36  cpu_self = rtems_smp_get_current_processor();
    3537
    3638  /* XXX - Delay a bit to allow debug messages from
     
    6466      directive_failed( status, "task create" );
    6567
    66       locked_printf(" CPU %d start task TA%c\n", cpu_self, ch);
     68      locked_printf(" CPU %" PRIu32 " start task TA%c\n", cpu_self, ch);
    6769      status = rtems_task_start( id, Test_task, i+1 );
    6870      directive_failed( status, "task start" );
  • testsuites/smptests/smp01/tasks.c

    ra7ce0ce r39e51758  
    1414#include "system.h"
    1515
     16#include <inttypes.h>
     17
    1618rtems_task Test_task(
    1719  rtems_task_argument task_index
    1820)
    1921{
    20   int               cpu_num;
     22  uint32_t          cpu_num;
    2123  char              name[5];
    2224  char             *p;
     
    2729
    2830   /* Get the CPU Number */
    29   cpu_num = bsp_smp_processor_id();
     31  cpu_num = rtems_smp_get_current_processor();
    3032
    3133  /* Print that the task is up and running. */
    3234  Loop();
    33   locked_printf(" CPU %d running Task %s\n", cpu_num, name);
     35  locked_printf(" CPU %" PRIu32 " running Task %s\n", cpu_num, name);
    3436
    3537  /* Set the flag that the task is up and running */
  • testsuites/smptests/smp02/init.c

    ra7ce0ce r39e51758  
    1616
    1717#include <stdio.h>
     18#include <inttypes.h>
    1819
    1920rtems_task Init(
     
    2324  int               i;
    2425  char              ch;
    25   int               cpu_num;
     26  uint32_t          cpu_num;
    2627  rtems_id          id;
    2728  rtems_status_code status;
     
    6061    );
    6162
    62     cpu_num = bsp_smp_processor_id();
    63     locked_printf(" CPU %d start task TA%c\n", cpu_num, ch);
     63    cpu_num = rtems_smp_get_current_processor();
     64    locked_printf(" CPU %" PRIu32 " start task TA%c\n", cpu_num, ch);
    6465    status = rtems_task_start( id, Test_task, i+1 );
    6566    directive_failed( status, str );
  • testsuites/smptests/smp02/system.h

    ra7ce0ce r39e51758  
    5151typedef struct {
    5252  bool     IsLocked;
    53   int      cpu_num;
     53  uint32_t cpu_num;
    5454  uint32_t task_index;
    5555} Log_t;
  • testsuites/smptests/smp02/tasks.c

    ra7ce0ce r39e51758  
    2222void LogSemaphore(
    2323  bool      obtained,
    24   int       cpu_num,
     24  uint32_t  cpu_num,
    2525  uint32_t  task_index
    2626){
     
    3838)
    3939{
    40   int               cpu_num;
     40  uint32_t          cpu_num;
    4141  rtems_status_code sc;
    4242
    43   cpu_num = bsp_smp_processor_id();
     43  cpu_num = rtems_smp_get_current_processor();
    4444
    4545  do {
  • testsuites/smptests/smp03/init.c

    ra7ce0ce r39e51758  
    1616
    1717#include <stdio.h>
     18#include <inttypes.h>
    1819
    1920void Loop() {
     
    2728)
    2829{
    29   int              cpu_num;
     30  uint32_t cpu_num;
    3031
    31   cpu_num = bsp_smp_processor_id();
     32  cpu_num = rtems_smp_get_current_processor();
    3233
    33   locked_printf("  CPU %d running task %s\n", cpu_num, task_name );
     34  locked_printf("  CPU %" PRIu32 " running task %s\n", cpu_num, task_name );
    3435}
    3536
     
    3839)
    3940{
    40   int               i;
     41  uint32_t          i;
    4142  char              ch = '0';
    4243  rtems_id          id;
  • testsuites/smptests/smp04/init.c

    ra7ce0ce r39e51758  
    1616
    1717#include <stdio.h>
     18#include <inttypes.h>
    1819
    1920
     
    2829)
    2930{
    30   int              cpu_num;
     31  uint32_t cpu_num;
    3132
    32   cpu_num = bsp_smp_processor_id();
     33  cpu_num = rtems_smp_get_current_processor();
    3334  locked_printf("  CPU %d running task TA%" PRIu32 "\n", cpu_num, task_index );
    3435  Loop();
     
    4243)
    4344{
    44   int               i;
     45  uint32_t          i;
    4546  char              ch;
    4647  rtems_id          id;
    4748  rtems_status_code status;
    4849  bool              allDone;
    49   int               cpu_num;
     50  uint32_t          cpu_num;
    5051
    5152  Loop();
     
    5455
    5556  /* Display which cpu is running this init thread. */
    56   cpu_num = bsp_smp_processor_id();
    57   locked_printf("  CPU %d running task Init\n", cpu_num );
     57  cpu_num = rtems_smp_get_current_processor();
     58  locked_printf("  CPU %" PRIu32 " running task Init\n", cpu_num );
    5859
    5960  /* Set all Tasks to not ran except for the init task */
  • testsuites/smptests/smp05/init.c

    ra7ce0ce r39e51758  
    1919)
    2020{
    21   locked_printf( "Shut down from CPU %d\n", bsp_smp_processor_id() );
     21  locked_printf( "Shut down from CPU %" PRIu32 "\n", rtems_smp_get_current_processor() );
    2222  locked_printf( "*** END OF TEST SMP05 ***\n" );
    2323  rtems_test_exit(0);
     
    2828)
    2929{
    30   int                i;
     30  uint32_t           i;
    3131  char               ch;
    32   int                cpu_num;
     32  uint32_t           cpu_num;
    3333  rtems_id           id;
    3434  rtems_status_code  status;
     
    5050    directive_failed( status, "task create" );
    5151
    52     cpu_num = bsp_smp_processor_id();
    53     locked_printf(" CPU %d start task TA%c\n", cpu_num, ch);
     52    cpu_num = rtems_smp_get_current_processor();
     53    locked_printf(" CPU %" PRIu32 " start task TA%c\n", cpu_num, ch);
    5454
    5555    status = rtems_task_start( id, Test_task, i+1 );
  • testsuites/smptests/smp06/init.c

    ra7ce0ce r39e51758  
    2121)
    2222{
    23   int               cpu_num;
     23  uint32_t          cpu_num;
    2424  char              name[5];
    2525  char             *p;
     
    2828  rtems_test_assert( p != NULL );
    2929
    30   cpu_num = bsp_smp_processor_id();
    31   locked_printf(" CPU %d running Task %s\n", cpu_num, name);
     30  cpu_num = rtems_smp_get_current_processor();
     31  locked_printf(" CPU %" PRIu32 " running Task %s\n", cpu_num, name);
    3232
    3333  Ran = true;
     
    4545)
    4646{
    47   int                cpu_num;
     47  uint32_t           cpu_num;
    4848  rtems_id           id;
    4949  rtems_status_code  status;
     
    5757  rtems_test_assert( rtems_smp_get_processor_count()  > 1 );
    5858
    59   cpu_num = bsp_smp_processor_id();
     59  cpu_num = rtems_smp_get_current_processor();
    6060
    6161  /*
     
    7373  directive_failed( status, "task create" );
    7474
    75   locked_printf(" CPU %d start task TA1\n", cpu_num );
     75  locked_printf(" CPU %" PRIu32 " start task TA1\n", cpu_num );
    7676
    7777  status = rtems_task_start( id, Test_task, 0 );
     
    9595  directive_failed( status, "task create" );
    9696
    97   cpu_num = bsp_smp_processor_id();
    98   locked_printf(" CPU %d start task TA2\n", cpu_num );
     97  cpu_num = rtems_smp_get_current_processor();
     98  locked_printf(" CPU %" PRIu32 " start task TA2\n", cpu_num );
    9999
    100100  status = rtems_task_start( id, Test_task, 1 );
  • testsuites/smptests/smp07/init.c

    ra7ce0ce r39e51758  
    2323)
    2424{
    25   int               cpu_num;
     25  uint32_t          cpu_num;
    2626  rtems_status_code sc;
    2727  char              name[5];
     
    3333
    3434   /* Get the CPU Number */
    35   cpu_num = bsp_smp_processor_id();
     35  cpu_num = rtems_smp_get_current_processor();
    3636
    3737  /* Print that the task is up and running. */
    38   locked_printf(" CPU %d runnng Task %s and blocking\n", cpu_num, name);
     38  locked_printf(" CPU %" PRIu32 " runnng Task %s and blocking\n", cpu_num, name);
    3939
    4040  sc = rtems_semaphore_obtain( Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
     
    4848  /* Print that the task is up and running. */
    4949  locked_printf(
    50     " CPU %d running Task %s after semaphore release\n",
     50    " CPU %" PRIu32 " running Task %s after semaphore release\n",
    5151    cpu_num,
    5252    name
     
    111111  directive_failed( status, "task create" );
    112112
    113   cpu_num = bsp_smp_processor_id();
     113  cpu_num = rtems_smp_get_current_processor();
    114114  locked_printf(" CPU %d start task TA1\n", cpu_num );
    115115  status = rtems_task_start( id, Test_task, 1 );
  • testsuites/smptests/smp08/init.c

    ra7ce0ce r39e51758  
    2020)
    2121{
    22   int              cpu_num;
     22  uint32_t cpu_num;
    2323
    24   cpu_num = bsp_smp_processor_id();
     24  cpu_num = rtems_smp_get_current_processor();
    2525
    2626  /* Print the cpu number and task name */
    2727  locked_printf(
    28     "  CPU %d running task %s - rtems_clock_get_tod "
     28    "  CPU %" PRIu32 " running task %s - rtems_clock_get_tod "
    2929    "%02" PRId32 ":%02" PRId32 ":%02" PRId32 "   %02" PRId32
    3030        "/%02" PRId32 "/%04" PRId32 "\n",
  • testsuites/smptests/smp08/tasks.c

    ra7ce0ce r39e51758  
    2222  uint32_t    task_index;
    2323  rtems_status_code status;
    24   int               cpu_num;
     24  uint32_t          cpu_num;
    2525  char              name[5];
    2626  char             *p;
     
    3535
    3636    /* Get the CPU Number */
    37     cpu_num = bsp_smp_processor_id();
     37    cpu_num = rtems_smp_get_current_processor();
    3838
    3939    status = rtems_clock_get_tod( &time );
  • testsuites/smptests/smp09/init.c

    ra7ce0ce r39e51758  
    3131)
    3232{
    33   int                i;
     33  uint32_t           i;
    3434  char               ch;
    35   int                cpu_num;
     35  uint32_t           cpu_num;
    3636  rtems_id           id;
    3737  rtems_status_code  status;
     
    5656    directive_failed( status, "task create" );
    5757
    58     cpu_num = bsp_smp_processor_id();
    59     locked_printf(" CPU %d start task TA%c\n", cpu_num, ch);
     58    cpu_num = rtems_smp_get_current_processor();
     59    locked_printf(" CPU %" PRIu32 " start task TA%c\n", cpu_num, ch);
    6060
    6161    status = rtems_task_start( id, Test_task, i+1 );
  • testsuites/smptests/smpatomic01/tasks.c

    ra7ce0ce r39e51758  
    4040    )
    4141{
    42   int               cpu_num;
     42  uint32_t          cpu_num;
    4343  char              name[5];
    4444  char             *p;
     
    4949
    5050   /* Get the CPU Number */
    51   cpu_num = bsp_smp_processor_id();
     51  cpu_num = rtems_smp_get_current_processor();
    5252
    5353  /* Print that the task is up and running. */
  • testsuites/smptests/smpatomic02/tasks.c

    ra7ce0ce r39e51758  
    4040    )
    4141{
    42   int               cpu_num;
     42  uint32_t          cpu_num;
    4343  char              name[5];
    4444  char             *p;
     
    4949
    5050   /* Get the CPU Number */
    51   cpu_num = bsp_smp_processor_id();
     51  cpu_num = rtems_smp_get_current_processor();
    5252
    5353  /* Print that the task is up and running. */
  • testsuites/smptests/smpatomic03/tasks.c

    ra7ce0ce r39e51758  
    4343    )
    4444{
    45   int               cpu_num;
     45  uint32_t          cpu_num;
    4646  char              name[5];
    4747  char             *p;
     
    5252
    5353   /* Get the CPU Number */
    54   cpu_num = bsp_smp_processor_id();
     54  cpu_num = rtems_smp_get_current_processor();
    5555
    5656  /* Print that the task is up and running. */
  • testsuites/smptests/smpatomic04/tasks.c

    ra7ce0ce r39e51758  
    4343    )
    4444{
    45   int               cpu_num;
     45  uint32_t          cpu_num;
    4646  char              name[5];
    4747  char             *p;
     
    5252
    5353   /* Get the CPU Number */
    54   cpu_num = bsp_smp_processor_id();
     54  cpu_num = rtems_smp_get_current_processor();
    5555
    5656  /* Print that the task is up and running. */
  • testsuites/smptests/smpatomic05/tasks.c

    ra7ce0ce r39e51758  
    4343    )
    4444{
    45   int               cpu_num;
     45  uint32_t          cpu_num;
    4646  char              name[5];
    4747  char             *p;
     
    5252
    5353   /* Get the CPU Number */
    54   cpu_num = bsp_smp_processor_id();
     54  cpu_num = rtems_smp_get_current_processor();
    5555
    5656  /* Print that the task is up and running. */
  • testsuites/smptests/smpatomic06/tasks.c

    ra7ce0ce r39e51758  
    4343    )
    4444{
    45   int               cpu_num;
     45  uint32_t          cpu_num;
    4646  char              name[5];
    4747  char             *p;
     
    5252
    5353   /* Get the CPU Number */
    54   cpu_num = bsp_smp_processor_id();
     54  cpu_num = rtems_smp_get_current_processor();
    5555
    5656  /* Print that the task is up and running. */
  • testsuites/smptests/smpatomic07/tasks.c

    ra7ce0ce r39e51758  
    5959    )
    6060{
    61   int               cpu_num;
     61  uint32_t          cpu_num;
    6262  char              name[5];
    6363  char             *p;
     
    6868
    6969   /* Get the CPU Number */
    70   cpu_num = bsp_smp_processor_id();
     70  cpu_num = rtems_smp_get_current_processor();
    7171
    7272  /* Print that the task is up and running. */
  • testsuites/smptests/smplock01/init.c

    ra7ce0ce r39e51758  
    299299{
    300300  global_context *ctx = (global_context *) arg;
    301   int cpu_count = (int) rtems_smp_get_processor_count();
    302   int cpu_self = rtems_smp_get_current_processor();
     301  uint32_t cpu_count = rtems_smp_get_processor_count();
     302  uint32_t cpu_self = rtems_smp_get_current_processor();
    303303  rtems_status_code sc;
    304304  barrier_state bs = BARRIER_STATE_INITIALIZER;
     
    313313{
    314314  global_context *ctx = &context;
    315   int cpu_count = (int) rtems_smp_get_processor_count();
    316   int cpu_self = rtems_smp_get_current_processor();
    317   int cpu;
     315  uint32_t cpu_count = rtems_smp_get_processor_count();
     316  uint32_t cpu_self = rtems_smp_get_current_processor();
     317  uint32_t cpu;
    318318  int test;
    319319  rtems_status_code sc;
     
    357357
    358358      printf(
    359         "\tprocessor %i, local counter %lu\n",
     359        "\tprocessor %" PRIu32 ", local counter %lu\n",
    360360        cpu,
    361361        local_counter
Note: See TracChangeset for help on using the changeset viewer.