Changeset cb5eaddf in rtems


Ignore:
Timestamp:
Apr 10, 2014, 9:02:52 AM (6 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
73b9af2d
Parents:
4bc8d2e
git-author:
Sebastian Huber <sebastian.huber@…> (04/10/14 09:02:52)
git-committer:
Sebastian Huber <sebastian.huber@…> (04/11/14 06:52:54)
Message:

rtems: Rename rtems_smp_get_current_processor()

Rename rtems_smp_get_current_processor() in
rtems_get_current_processor(). Make rtems_get_current_processor() a
function in uni-processor configurations to enable ABI compatibility
with SMP configurations.

Files:
1 added
22 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/arm/altera-cyclone-v/startup/bspreset.c

    r4bc8d2e rcb5eaddf  
    2020void bsp_reset(void)
    2121{
    22   uint32_t           self_cpu  = rtems_smp_get_current_processor();
     22  uint32_t           self_cpu  = rtems_get_current_processor();
    2323  volatile uint32_t *mpumodrst = ALT_RSTMGR_MPUMODRST_ADDR;
    2424 
  • c/src/lib/libbsp/sparc/leon3/startup/bspreset.c

    r4bc8d2e rcb5eaddf  
    2121void bsp_reset(void)
    2222{
    23   uint32_t self_cpu = rtems_smp_get_current_processor();
     23  uint32_t self_cpu = rtems_get_current_processor();
    2424
    2525  if (self_cpu == 0) {
  • cpukit/rtems/Makefile.am

    r4bc8d2e rcb5eaddf  
    260260librtems_a_SOURCES += src/statustext.c
    261261
     262librtems_a_SOURCES += src/getcurrentprocessor.c
    262263librtems_a_SOURCES += src/getprocessorcount.c
    263264
  • cpukit/rtems/include/rtems/rtems/smp.h

    r4bc8d2e rcb5eaddf  
    1919#define _RTEMS_RTEMS_SMP_H
    2020
     21#include <stdint.h>
     22
    2123#ifdef __cplusplus
    2224extern "C" {
    2325#endif
    24 
    25 #include <rtems/score/smp.h>
    2626
    2727/**
     
    5656 * @brief Returns the index of the current processor.
    5757 *
    58  * On uni-processor configurations this is a compile time constant and defined
    59  * to be zero.
     58 * On uni-processor configurations a value of zero will be returned.
    6059 *
    6160 * On SMP configurations an architecture specific method is used to obtain the
     
    7170 * @return The index of the current processor.
    7271 */
    73 #define rtems_smp_get_current_processor() \
    74   _SMP_Get_current_processor()
     72uint32_t rtems_get_current_processor(void);
    7573
    7674/** @} */
  • cpukit/sapi/src/testextension.c

    r4bc8d2e rcb5eaddf  
    3030  (void) code;
    3131
    32   if (rtems_smp_get_current_processor() == 0) {
     32  if (rtems_get_current_processor() == 0) {
    3333    rtems_profiling_report_xml(
    3434      rtems_test_name,
  • testsuites/smptests/smp01/init.c

    r4bc8d2e rcb5eaddf  
    3636  bool               allDone;
    3737
    38   cpu_self = rtems_smp_get_current_processor();
     38  cpu_self = rtems_get_current_processor();
    3939
    4040  /* XXX - Delay a bit to allow debug messages from
  • testsuites/smptests/smp01/tasks.c

    r4bc8d2e rcb5eaddf  
    2929
    3030   /* Get the CPU Number */
    31   cpu_num = rtems_smp_get_current_processor();
     31  cpu_num = rtems_get_current_processor();
    3232
    3333  /* Print that the task is up and running. */
  • testsuites/smptests/smp02/init.c

    r4bc8d2e rcb5eaddf  
    7474    );
    7575
    76     cpu_num = rtems_smp_get_current_processor();
     76    cpu_num = rtems_get_current_processor();
    7777    locked_printf(" CPU %" PRIu32 " start task TA%c\n", cpu_num, ch);
    7878    status = rtems_task_start( id, Test_task, i+1 );
  • testsuites/smptests/smp02/tasks.c

    r4bc8d2e rcb5eaddf  
    4141  rtems_status_code sc;
    4242
    43   cpu_num = rtems_smp_get_current_processor();
     43  cpu_num = rtems_get_current_processor();
    4444
    4545  do {
  • testsuites/smptests/smp03/init.c

    r4bc8d2e rcb5eaddf  
    3838  uint32_t cpu_num;
    3939
    40   cpu_num = rtems_smp_get_current_processor();
     40  cpu_num = rtems_get_current_processor();
    4141
    4242  locked_printf("  CPU %" PRIu32 " running task %s\n", cpu_num, task_name );
  • testsuites/smptests/smp05/init.c

    r4bc8d2e rcb5eaddf  
    2727)
    2828{
    29   locked_printf( "Shut down from CPU %" PRIu32 "\n", rtems_smp_get_current_processor() );
     29  locked_printf( "Shut down from CPU %" PRIu32 "\n", rtems_get_current_processor() );
    3030  success();
    3131}
     
    6262    directive_failed( status, "task create" );
    6363
    64     cpu_num = rtems_smp_get_current_processor();
     64    cpu_num = rtems_get_current_processor();
    6565    locked_printf(" CPU %" PRIu32 " start task TA%c\n", cpu_num, ch);
    6666
  • testsuites/smptests/smp07/init.c

    r4bc8d2e rcb5eaddf  
    4141
    4242   /* Get the CPU Number */
    43   cpu_num = rtems_smp_get_current_processor();
     43  cpu_num = rtems_get_current_processor();
    4444
    4545  /* Print that the task is up and running. */
     
    125125  directive_failed( status, "task create" );
    126126
    127   cpu_num = rtems_smp_get_current_processor();
     127  cpu_num = rtems_get_current_processor();
    128128  locked_printf(" CPU %d start task TA1\n", cpu_num );
    129129  status = rtems_task_start( id, Test_task, 1 );
  • testsuites/smptests/smp08/init.c

    r4bc8d2e rcb5eaddf  
    2424  uint32_t cpu_num;
    2525
    26   cpu_num = rtems_smp_get_current_processor();
     26  cpu_num = rtems_get_current_processor();
    2727
    2828  /* Print the cpu number and task name */
  • testsuites/smptests/smp08/tasks.c

    r4bc8d2e rcb5eaddf  
    3535
    3636    /* Get the CPU Number */
    37     cpu_num = rtems_smp_get_current_processor();
     37    cpu_num = rtems_get_current_processor();
    3838
    3939    status = rtems_clock_get_tod( &time );
  • testsuites/smptests/smp09/init.c

    r4bc8d2e rcb5eaddf  
    5959    directive_failed( status, "task create" );
    6060
    61     cpu_num = rtems_smp_get_current_processor();
     61    cpu_num = rtems_get_current_processor();
    6262    locked_printf(" CPU %" PRIu32 " start task TA%c\n", cpu_num, ch);
    6363
  • testsuites/smptests/smpfatal01/init.c

    r4bc8d2e rcb5eaddf  
    4343{
    4444  if (source == RTEMS_FATAL_SOURCE_SMP) {
    45     uint32_t self = rtems_smp_get_current_processor();
     45    uint32_t self = rtems_get_current_processor();
    4646
    4747    assert(!is_internal);
     
    6969)
    7070{
    71   uint32_t self = rtems_smp_get_current_processor();
     71  uint32_t self = rtems_get_current_processor();
    7272  uint32_t cpu_count = rtems_get_processor_count();
    7373  uint32_t cpu;
  • testsuites/smptests/smpfatal02/init.c

    r4bc8d2e rcb5eaddf  
    4646      || source == RTEMS_FATAL_SOURCE_SMP
    4747  ) {
    48     uint32_t self = rtems_smp_get_current_processor();
     48    uint32_t self = rtems_get_current_processor();
    4949
    5050    assert(!is_internal);
     
    7777)
    7878{
    79   uint32_t self = rtems_smp_get_current_processor();
     79  uint32_t self = rtems_get_current_processor();
    8080  uint32_t cpu_count = rtems_get_processor_count();
    8181  uint32_t cpu;
  • testsuites/smptests/smpfatal03/init.c

    r4bc8d2e rcb5eaddf  
    6868static void Init(rtems_task_argument arg)
    6969{
    70   uint32_t self = rtems_smp_get_current_processor();
     70  uint32_t self = rtems_get_current_processor();
    7171  uint32_t cpu_count = rtems_get_processor_count();
    7272
     
    109109      || source == RTEMS_FATAL_SOURCE_SMP
    110110  ) {
    111     uint32_t self = rtems_smp_get_current_processor();
     111    uint32_t self = rtems_get_current_processor();
    112112    SMP_barrier_State state = SMP_BARRIER_STATE_INITIALIZER;
    113113
  • testsuites/smptests/smplock01/init.c

    r4bc8d2e rcb5eaddf  
    261261  global_context *ctx = (global_context *) arg;
    262262  uint32_t cpu_count = rtems_get_processor_count();
    263   uint32_t cpu_self = rtems_smp_get_current_processor();
     263  uint32_t cpu_self = rtems_get_current_processor();
    264264  rtems_status_code sc;
    265265  SMP_barrier_State bs = SMP_BARRIER_STATE_INITIALIZER;
     
    275275  global_context *ctx = &context;
    276276  uint32_t cpu_count = rtems_get_processor_count();
    277   uint32_t cpu_self = rtems_smp_get_current_processor();
     277  uint32_t cpu_self = rtems_get_current_processor();
    278278  uint32_t cpu;
    279279  int test;
  • testsuites/smptests/smpmigration01/init.c

    r4bc8d2e rcb5eaddf  
    7474
    7575  while (true) {
    76     uint32_t current_cpu = rtems_smp_get_current_processor();
     76    uint32_t current_cpu = rtems_get_current_processor();
    7777
    7878    ++counters->cycles_per_cpu[current_cpu].counter;
  • testsuites/smptests/smppsxsignal01/init.c

    r4bc8d2e rcb5eaddf  
    8383{
    8484  rtems_test_assert(
    85     ctx->consumer_processor == rtems_smp_get_current_processor()
     85    ctx->consumer_processor == rtems_get_current_processor()
    8686  );
    8787}
     
    9090{
    9191  rtems_test_assert(
    92     ctx->producer_processor == rtems_smp_get_current_processor()
     92    ctx->producer_processor == rtems_get_current_processor()
    9393  );
    9494}
     
    9898  test_context *ctx = arg;
    9999
    100   ctx->producer_processor = rtems_smp_get_current_processor();
     100  ctx->producer_processor = rtems_get_current_processor();
    101101
    102102  rtems_test_assert(ctx->consumer_processor != ctx->producer_processor);
     
    121121
    122122  ctx->consumer = pthread_self();
    123   ctx->consumer_processor = rtems_smp_get_current_processor();
     123  ctx->consumer_processor = rtems_get_current_processor();
    124124
    125125  memset(&new_action, 0, sizeof(new_action));
  • testsuites/smptests/smpsignal01/init.c

    r4bc8d2e rcb5eaddf  
    8787{
    8888  rtems_test_assert(
    89     ctx->consumer_processor == rtems_smp_get_current_processor()
     89    ctx->consumer_processor == rtems_get_current_processor()
    9090  );
    9191}
     
    9494{
    9595  rtems_test_assert(
    96     ctx->producer_processor == rtems_smp_get_current_processor()
     96    ctx->producer_processor == rtems_get_current_processor()
    9797  );
    9898}
     
    102102  test_context *ctx = (test_context *) arg;
    103103
    104   ctx->producer_processor = rtems_smp_get_current_processor();
     104  ctx->producer_processor = rtems_get_current_processor();
    105105
    106106  rtems_test_assert(ctx->consumer_processor != ctx->producer_processor);
     
    127127
    128128  ctx->consumer = rtems_task_self();
    129   ctx->consumer_processor = rtems_smp_get_current_processor();
     129  ctx->consumer_processor = rtems_get_current_processor();
    130130
    131131  sc = rtems_signal_catch(signal_handler, RTEMS_DEFAULT_MODES);
Note: See TracChangeset for help on using the changeset viewer.