Changeset 4bc8d2e in rtems


Ignore:
Timestamp:
Apr 10, 2014, 8:58:27 AM (6 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
cb5eaddf
Parents:
263f4bec
git-author:
Sebastian Huber <sebastian.huber@…> (04/10/14 08:58:27)
git-committer:
Sebastian Huber <sebastian.huber@…> (04/11/14 06:52:54)
Message:

rtems: Rename rtems_smp_get_processor_count()

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

Files:
1 added
28 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/sparc/leon3/startup/bspreset.c

    r263f4bec r4bc8d2e  
    3333      uint32_t max_wait = 1234567;
    3434
    35       uint32_t cpu_count = rtems_smp_get_processor_count();
     35      uint32_t cpu_count = rtems_get_processor_count();
    3636      uint32_t halt_mask = 0;
    3737      uint32_t i;
  • cpukit/libmisc/cpuuse/cpuusagereset.c

    r263f4bec r4bc8d2e  
    4646    _TOD_Get_uptime( &CPU_usage_Uptime_at_last_reset );
    4747
    48     processor_count = rtems_smp_get_processor_count();
     48    processor_count = rtems_get_processor_count();
    4949    for ( processor = 0 ; processor < processor_count ; ++processor ) {
    5050      Per_CPU_Control *per_cpu = _Per_CPU_Get_by_index( processor );
  • cpukit/rtems/Makefile.am

    r263f4bec r4bc8d2e  
    260260librtems_a_SOURCES += src/statustext.c
    261261
     262librtems_a_SOURCES += src/getprocessorcount.c
     263
    262264if HAS_MP
    263265# We only build multiprocessing related files if HAS_MP was defined
  • cpukit/rtems/include/rtems/rtems/smp.h

    r263f4bec r4bc8d2e  
    4141 * @brief Returns the count of processors in the system.
    4242 *
    43  * On uni-processor configurations this is a compile time constant and defined
    44  * to be one.
     43 * On uni-processor configurations a value of one will be returned.
    4544 *
    4645 * On SMP configurations this returns the value of a global variable set during
     
    5251 * @return The count of processors in the system.
    5352 */
    54 #define rtems_smp_get_processor_count() \
    55   _SMP_Get_processor_count()
     53uint32_t rtems_get_processor_count(void);
    5654
    5755/**
  • cpukit/sapi/src/profilingiterate.c

    r263f4bec r4bc8d2e  
    3131{
    3232#ifdef RTEMS_PROFILING
    33   uint32_t n = rtems_smp_get_processor_count();
     33  uint32_t n = rtems_get_processor_count();
    3434  uint32_t i;
    3535
  • testsuites/smptests/smp01/init.c

    r263f4bec r4bc8d2e  
    4949
    5050  /* Initialize the TaskRan array */
    51   for ( i=0; i<rtems_smp_get_processor_count() ; i++ ) {
     51  for ( i=0; i<rtems_get_processor_count() ; i++ ) {
    5252    TaskRan[i] = false;
    5353  }
    5454
    5555  /* Create and start tasks for each processor */
    56   for ( i=0; i< rtems_smp_get_processor_count() ; i++ ) {
     56  for ( i=0; i< rtems_get_processor_count() ; i++ ) {
    5757    if ( i != cpu_self ) {
    5858      ch = '0' + i;
     
    7979  while (1) {
    8080    allDone = true;
    81     for ( i=0; i<rtems_smp_get_processor_count() ; i++ ) {
     81    for ( i=0; i<rtems_get_processor_count() ; i++ ) {
    8282      if ( i != cpu_self && TaskRan[i] == false)
    8383        allDone = false;
  • testsuites/smptests/smp02/init.c

    r263f4bec r4bc8d2e  
    4141  locked_print_initialize();
    4242
    43   if ( rtems_smp_get_processor_count() == 1 ) {
     43  if ( rtems_get_processor_count() == 1 ) {
    4444    success();
    4545  }
     
    6060  directive_failed( status,"rtems_semaphore_obtain of SEM1\n");
    6161
    62   for ( i=1; i < rtems_smp_get_processor_count(); i++ ){
     62  for ( i=1; i < rtems_get_processor_count(); i++ ){
    6363
    6464    /* Create and start tasks for each CPU */
  • testsuites/smptests/smp03/init.c

    r263f4bec r4bc8d2e  
    5858  locked_print_initialize();
    5959
    60   if ( rtems_smp_get_processor_count() == 1 ) {
     60  if ( rtems_get_processor_count() == 1 ) {
    6161    success();
    6262  }
     
    6464  /* Initialize the TaskRan array */
    6565  TaskRan[0] = true;
    66   for ( i=1; i<rtems_smp_get_processor_count() ; i++ ) {
     66  for ( i=1; i<rtems_get_processor_count() ; i++ ) {
    6767    TaskRan[i] = false;
    6868  }
     
    7272
    7373  /* for each remaining cpu create and start a task */
    74   for ( i=1; i < rtems_smp_get_processor_count(); i++ ){
     74  for ( i=1; i < rtems_get_processor_count(); i++ ){
    7575
    7676    ch = '0' + i;
     
    102102    &id
    103103  );
    104   status = rtems_task_start(id,Test_task,rtems_smp_get_processor_count());
     104  status = rtems_task_start(id,Test_task,rtems_get_processor_count());
    105105
    106106  /* Wait on all tasks to run */
    107107  while (1) {
    108108    TestFinished = true;
    109     for ( i=1; i < (rtems_smp_get_processor_count()+1) ; i++ ) {
     109    for ( i=1; i < (rtems_get_processor_count()+1) ; i++ ) {
    110110      if (TaskRan[i] == false)
    111111        TestFinished = false;
  • testsuites/smptests/smp05/init.c

    r263f4bec r4bc8d2e  
    4545  locked_print_initialize();
    4646
    47   if ( rtems_smp_get_processor_count() == 1 ) {
     47  if ( rtems_get_processor_count() == 1 ) {
    4848    success();
    4949  }
    5050
    51   for ( i=0; i<rtems_smp_get_processor_count() ; i++ ) {
     51  for ( i=0; i<rtems_get_processor_count() ; i++ ) {
    5252    ch = '1' + i;
    5353
  • testsuites/smptests/smp07/init.c

    r263f4bec r4bc8d2e  
    9494  locked_print_initialize();
    9595
    96   if ( rtems_smp_get_processor_count() == 1 ) {
     96  if ( rtems_get_processor_count() == 1 ) {
    9797    success();
    9898  }
  • testsuites/smptests/smp08/init.c

    r263f4bec r4bc8d2e  
    7777  PrintTaskInfo( "Init", &time );
    7878
    79   for ( i=1; i <= rtems_smp_get_processor_count() *3; i++ ) {
     79  for ( i=1; i <= rtems_get_processor_count() *3; i++ ) {
    8080
    8181    sprintf(ch, "%02" PRId32, i );
  • testsuites/smptests/smp09/init.c

    r263f4bec r4bc8d2e  
    4646    ;
    4747 
    48   for ( i=0; i<rtems_smp_get_processor_count() -1; i++ ) {
     48  for ( i=0; i<rtems_get_processor_count() -1; i++ ) {
    4949    ch = '1' + i;
    5050
  • testsuites/smptests/smpaffinity01/init.c

    r263f4bec r4bc8d2e  
    113113
    114114  /* Get the number of processors that we are using. */
    115   cpu_count = rtems_smp_get_processor_count();
     115  cpu_count = rtems_get_processor_count();
    116116
    117117  /* Fill the remaining cpus with med priority tasks */
  • testsuites/smptests/smpatomic01/init.c

    r263f4bec r4bc8d2e  
    447447  test_static_and_dynamic_initialization();
    448448
    449   ctx->worker_count = rtems_smp_get_processor_count();
     449  ctx->worker_count = rtems_get_processor_count();
    450450
    451451  sc = rtems_timer_create(
  • testsuites/smptests/smpfatal01/init.c

    r263f4bec r4bc8d2e  
    7070{
    7171  uint32_t self = rtems_smp_get_current_processor();
    72   uint32_t cpu_count = rtems_smp_get_processor_count();
     72  uint32_t cpu_count = rtems_get_processor_count();
    7373  uint32_t cpu;
    7474
  • testsuites/smptests/smpfatal02/init.c

    r263f4bec r4bc8d2e  
    7878{
    7979  uint32_t self = rtems_smp_get_current_processor();
    80   uint32_t cpu_count = rtems_smp_get_processor_count();
     80  uint32_t cpu_count = rtems_get_processor_count();
    8181  uint32_t cpu;
    8282
  • testsuites/smptests/smpfatal03/init.c

    r263f4bec r4bc8d2e  
    6969{
    7070  uint32_t self = rtems_smp_get_current_processor();
    71   uint32_t cpu_count = rtems_smp_get_processor_count();
     71  uint32_t cpu_count = rtems_get_processor_count();
    7272
    7373  rtems_test_begink();
  • testsuites/smptests/smpload01/init.c

    r263f4bec r4bc8d2e  
    8282  rtems_status_code sc;
    8383  SMP_barrier_State barrier_state = SMP_BARRIER_STATE_INITIALIZER;
    84   uint32_t cpu_count = rtems_smp_get_processor_count();
     84  uint32_t cpu_count = rtems_get_processor_count();
    8585  rtems_counter_ticks delay = (cpu_count - 1 - arg) * ctx->inherit_obtain_delay;
    8686
     
    339339  rtems_test_assert(sc == RTEMS_SUCCESSFUL);
    340340
    341   for (i = 0; i < rtems_smp_get_processor_count(); ++i) {
     341  for (i = 0; i < rtems_get_processor_count(); ++i) {
    342342    sc = rtems_task_create(
    343343      rtems_build_name('I', 'N', 'H', 'O'),
     
    374374  );
    375375
    376   for (i = 0; i < rtems_smp_get_processor_count(); ++i) {
     376  for (i = 0; i < rtems_get_processor_count(); ++i) {
    377377    printf(
    378378      "priority inheritance obtain count %2" PRIu32 ": %" PRIu64 "\n",
  • testsuites/smptests/smplock01/init.c

    r263f4bec r4bc8d2e  
    260260{
    261261  global_context *ctx = (global_context *) arg;
    262   uint32_t cpu_count = rtems_smp_get_processor_count();
     262  uint32_t cpu_count = rtems_get_processor_count();
    263263  uint32_t cpu_self = rtems_smp_get_current_processor();
    264264  rtems_status_code sc;
     
    274274{
    275275  global_context *ctx = &context;
    276   uint32_t cpu_count = rtems_smp_get_processor_count();
     276  uint32_t cpu_count = rtems_get_processor_count();
    277277  uint32_t cpu_self = rtems_smp_get_current_processor();
    278278  uint32_t cpu;
  • testsuites/smptests/smpmigration01/init.c

    r263f4bec r4bc8d2e  
    225225  TEST_BEGIN();
    226226
    227   if (rtems_smp_get_processor_count() >= 2) {
     227  if (rtems_get_processor_count() >= 2) {
    228228    test();
    229229  }
  • testsuites/smptests/smppsxaffinity01/init.c

    r263f4bec r4bc8d2e  
    107107
    108108
    109   cpus = rtems_smp_get_processor_count();
     109  cpus = rtems_get_processor_count();
    110110  puts(
    111111    "Init - Validate pthread_attr_setaffinity_np and "
  • testsuites/smptests/smppsxaffinity02/init.c

    r263f4bec r4bc8d2e  
    122122
    123123  /* Get the number of processors that we are using. */
    124   cpu_count = rtems_smp_get_processor_count();
     124  cpu_count = rtems_get_processor_count();
    125125
    126126  /* Fill the remaining cpus with med priority tasks */
  • testsuites/smptests/smppsxsignal01/init.c

    r263f4bec r4bc8d2e  
    166166  TEST_BEGIN();
    167167
    168   if (rtems_smp_get_processor_count() >= 2) {
     168  if (rtems_get_processor_count() >= 2) {
    169169    test();
    170170  }
  • testsuites/smptests/smpscheduler01/init.c

    r263f4bec r4bc8d2e  
    7070{
    7171  bool ok = true;
    72   uint32_t n = rtems_smp_get_processor_count();
     72  uint32_t n = rtems_get_processor_count();
    7373  uint32_t i;
    7474
  • testsuites/smptests/smpsignal01/init.c

    r263f4bec r4bc8d2e  
    167167  TEST_BEGIN();
    168168
    169   if (rtems_smp_get_processor_count() >= 2) {
     169  if (rtems_get_processor_count() >= 2) {
    170170    test();
    171171  }
  • testsuites/smptests/smpswitchextension01/init.c

    r263f4bec r4bc8d2e  
    226226  TEST_BEGIN();
    227227
    228   if (rtems_smp_get_processor_count() >= 2) {
     228  if (rtems_get_processor_count() >= 2) {
    229229    test();
    230230  }
  • testsuites/smptests/smpthreadlife01/init.c

    r263f4bec r4bc8d2e  
    299299  TEST_BEGIN();
    300300
    301   if (rtems_smp_get_processor_count() >= CPU_COUNT) {
     301  if (rtems_get_processor_count() >= CPU_COUNT) {
    302302    test_restart();
    303303    test_delete();
  • testsuites/tmtests/tmcontext01/init.c

    r263f4bec r4bc8d2e  
    215215  test(true, load);
    216216
    217   for (load = 1; load < rtems_smp_get_processor_count(); ++load) {
     217  for (load = 1; load < rtems_get_processor_count(); ++load) {
    218218    rtems_status_code sc;
    219219    rtems_id id;
Note: See TracChangeset for help on using the changeset viewer.