Changeset 9372906 in rtems-schedsim


Ignore:
Timestamp:
May 22, 2014, 9:17:48 PM (5 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
master
Children:
c172779
Parents:
ff91f4e
Message:

main_dump_all_cpus.c: Stop at end of args or CPUs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • schedsim/shell/shared/main_dump_all_cpus.c

    rff91f4e r9372906  
    6060   */
    6161  mismatch = false;
    62   for ( cpu=0 ; cpu < rtems_get_processor_count() ; cpu++ ) {
     62  for ( cpu=0 ; cpu < rtems_get_processor_count() && cpu < argc ; cpu++ ) {
    6363    e = _Per_CPU_Information[cpu].per_cpu.executing;
    6464
     
    6969      return -1;
    7070
    71     if ( e->Object.id != id ) {
    72       mismatch = true;
    73       printf(
    74         "*** ERROR on CPU %d Expected 0x%08x found 0x%08x executing\n",
    75         cpu,
    76         id,
    77         e->Object.id
    78       );
     71    if ( !strcmp( argv[cpu + 1], "IDLE" )) {
     72      /* XXX should do something cleaner for the ID mask */
     73      if ( (e->Object.id & 0xFFFF0000) != 0x09010000 ) {
     74        mismatch = true;
     75        printf(
     76          "*** ERROR on CPU %d Expected an IDLE found 0x%08x executing\n",
     77          cpu,
     78          e->Object.id
     79        );
     80      }
     81    } else {
     82      if ( lookup_task( argv[cpu + 1], &id ) ) {
     83        printf(
     84          "*** ERROR in scenario -- unknown task %s\n",
     85           argv[cpu + 1]
     86        );
     87        exit( 1 );
     88      }
     89
     90      if ( e->Object.id != id ) {
     91        mismatch = true;
     92        printf(
     93          "*** ERROR on CPU %d Expected 0x%08x found 0x%08x executing\n",
     94          cpu,
     95          id,
     96          e->Object.id
     97        );
     98      }
    7999    }
    80100  }
Note: See TracChangeset for help on using the changeset viewer.