Changeset 63977bb4 in rtems


Ignore:
Timestamp:
Jul 1, 2002, 10:19:33 PM (18 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
17083db
Parents:
ee13a74
Message:

2002-07-01 Joel Sherrill <joel@…>

  • capture/capture-cli.c, cpuuse/cpuuse.c, monitor/mon-monitor.c, monitor/mon-object.c, monitor/monitor.h: Corrected use of _Objects_Information_table now that it is a two dimensional array based upon API and class. In addition, in the monitor, corrected an error which occured when a target has 64 bit pointers.
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • c/src/libmisc/ChangeLog

    ree13a74 r63977bb4  
     12002-07-01      Joel Sherrill <joel@OARcorp.com>
     2
     3        * capture/capture-cli.c, cpuuse/cpuuse.c, monitor/mon-monitor.c,
     4        monitor/mon-object.c, monitor/monitor.h: Corrected use of
     5        _Objects_Information_table now that it is a two dimensional
     6        array based upon API and class.  In addition, in the monitor,
     7        corrected an error which occured when a target has 64 bit pointers.
     8
    192002-07-01      Joel Sherrill <joel@OARcorp.com>
    210
  • c/src/libmisc/capture/capture-cli.c

    ree13a74 r63977bb4  
    574574                               rtems_id*      id)
    575575{
    576   Objects_Classes objclass;
     576  unsigned32 objclass;
    577577  int             l;
    578578  int             i;
     
    598598  objclass = _Objects_Get_class (*id);
    599599 
    600   if ((i == l) && (l > 4) &&
    601       ((objclass == OBJECTS_INTERNAL_THREADS) ||
    602        (objclass == OBJECTS_RTEMS_TASKS) ||
    603        (objclass == OBJECTS_POSIX_THREADS) ||
    604        (objclass == OBJECTS_ITRON_TASKS)))
     600  if ((i == l))
    605601    *valid_id = 1;
    606602  else
  • c/src/libmisc/cpuuse/cpuuse.c

    ree13a74 r63977bb4  
    3232{
    3333  unsigned32           i;
    34   unsigned32           class_index;
     34  unsigned32           api_index;
    3535  Thread_Control      *the_thread;
    3636  Objects_Information *information;
     
    3939  unsigned32           total_units = 0;
    4040
    41   for ( class_index = OBJECTS_CLASSES_FIRST ;
    42         class_index <= OBJECTS_CLASSES_LAST ;
    43         class_index++ ) {
    44     information = _Objects_Information_table[ class_index ];
    45     if ( information && information->is_thread ) {
     41  for ( api_index = 1 ;
     42        api_index <= OBJECTS_APIS_LAST ;
     43        api_index++ ) {
     44    if ( !_Objects_Information_table[ api_index ] )
     45      continue;
     46    information = _Objects_Information_table[ api_index ][ 1 ];
     47    if ( information ) {
    4648      for ( i=1 ; i <= information->maximum ; i++ ) {
    4749        the_thread = (Thread_Control *)information->local_table[ i ];
     
    6062#endif
    6163
    62   for ( class_index = OBJECTS_CLASSES_FIRST ;
    63         class_index <= OBJECTS_CLASSES_LAST ;
    64         class_index++ ) {
    65     information = _Objects_Information_table[ class_index ];
    66     if ( information && information->is_thread ) {
     64  for ( api_index = 1 ;
     65        api_index <= OBJECTS_APIS_LAST ;
     66        api_index++ ) {
     67    if ( !_Objects_Information_table[ api_index ] )
     68      continue;
     69    information = _Objects_Information_table[ api_index ][ 1 ];
     70    if ( information ) {
    6771      for ( i=1 ; i <= information->maximum ; i++ ) {
    6872        the_thread = (Thread_Control *)information->local_table[ i ];
     
    114118{
    115119  unsigned32           i;
    116   unsigned32           class_index;
     120  unsigned32           api_index;
    117121  Thread_Control      *the_thread;
    118122  Objects_Information *information;
     
    120124  CPU_usage_Ticks_at_last_reset = _Watchdog_Ticks_since_boot;
    121125
    122   for ( class_index = OBJECTS_CLASSES_FIRST ;
    123         class_index <= OBJECTS_CLASSES_LAST ;
    124         class_index++ ) {
    125     information = _Objects_Information_table[ class_index ];
    126     if ( information && information->is_thread ) {
     126  for ( api_index = 1 ;
     127        api_index <= OBJECTS_APIS_LAST ;
     128        api_index++ ) {
     129    if ( !_Objects_Information_table[ api_index ] )
     130      continue;
     131    information = _Objects_Information_table[ api_index ][ 1 ];
     132    if ( information ) {
    127133      for ( i=1 ; i <= information->maximum ; i++ ) {
    128134        the_thread = (Thread_Control *)information->local_table[ i ];
  • c/src/libmisc/monitor/mon-monitor.c

    ree13a74 r63977bb4  
    7070      0,
    7171      rtems_monitor_object_cmd,
    72       RTEMS_MONITOR_OBJECT_CONFIG,
     72      (rtems_monitor_command_arg_t) RTEMS_MONITOR_OBJECT_CONFIG,
    7373      &rtems_monitor_commands[1],
    7474    },
     
    7777      0,
    7878      rtems_monitor_object_cmd,
    79       RTEMS_MONITOR_OBJECT_INIT_TASK,
     79      (rtems_monitor_command_arg_t) RTEMS_MONITOR_OBJECT_INIT_TASK,
    8080      &rtems_monitor_commands[2],
    8181    },
     
    8484      0,
    8585      rtems_monitor_object_cmd,
    86       RTEMS_MONITOR_OBJECT_MPCI,
     86      (rtems_monitor_command_arg_t) RTEMS_MONITOR_OBJECT_MPCI,
    8787      &rtems_monitor_commands[3],
    8888    },
     
    128128      0,    /* XXX find a way to fix the compile time error on h8 */
    129129#else
    130       (unsigned32) &rtems_monitor_symbols,
     130      (rtems_monitor_command_arg_t) &rtems_monitor_symbols,
    131131#endif
    132132      &rtems_monitor_commands[8],
     
    138138      0,
    139139      rtems_monitor_object_cmd,
    140       RTEMS_MONITOR_OBJECT_EXTENSION,
     140      (rtems_monitor_command_arg_t) RTEMS_MONITOR_OBJECT_EXTENSION,
    141141      &rtems_monitor_commands[9],
    142142    },
     
    147147      0,
    148148      rtems_monitor_object_cmd,
    149       RTEMS_MONITOR_OBJECT_TASK,
     149      (rtems_monitor_command_arg_t) RTEMS_MONITOR_OBJECT_TASK,
    150150      &rtems_monitor_commands[10],
    151151    },
     
    156156      0,
    157157      rtems_monitor_object_cmd,
    158       RTEMS_MONITOR_OBJECT_QUEUE,
     158      (rtems_monitor_command_arg_t) RTEMS_MONITOR_OBJECT_QUEUE,
    159159      &rtems_monitor_commands[11],
    160160    },
     
    166166      0,
    167167      rtems_monitor_object_cmd,
    168       RTEMS_MONITOR_OBJECT_INVALID,
     168      (rtems_monitor_command_arg_t) RTEMS_MONITOR_OBJECT_INVALID,
    169169      &rtems_monitor_commands[12],
    170170    },
     
    174174      0,
    175175      rtems_monitor_object_cmd,
    176       RTEMS_MONITOR_OBJECT_DRIVER,
     176      (rtems_monitor_command_arg_t) RTEMS_MONITOR_OBJECT_DRIVER,
    177177      &rtems_monitor_commands[13],
    178178    },
     
    181181      0,
    182182      rtems_monitor_object_cmd,
    183       RTEMS_MONITOR_OBJECT_DNAME,
     183      (rtems_monitor_command_arg_t) RTEMS_MONITOR_OBJECT_DNAME,
    184184      &rtems_monitor_commands[14],
    185185    },
     
    190190      0,
    191191      rtems_monitor_fatal_cmd,
    192       RTEMS_SUCCESSFUL,
     192      (rtems_monitor_command_arg_t) RTEMS_SUCCESSFUL,
    193193      &rtems_monitor_commands[15],
    194194    },
     
    198198      0,
    199199      rtems_monitor_fatal_cmd,
    200       RTEMS_TASK_EXITTED,                       /* exit value */
     200      (rtems_monitor_command_arg_t) RTEMS_TASK_EXITTED,         /* exit value */
    201201      &rtems_monitor_commands[16],
    202202    },
     
    205205      0,
    206206      rtems_monitor_fatal_cmd,
    207       RTEMS_SUCCESSFUL,                         /* exit value */
     207      (rtems_monitor_command_arg_t) RTEMS_SUCCESSFUL,                           /* exit value */
    208208      &rtems_monitor_commands[17],
    209209    },
     
    217217      0,    /* XXX find a way to fix the compile time error on h8 */
    218218#else
    219       (unsigned32) rtems_monitor_commands,
     219      (rtems_monitor_command_arg_t) rtems_monitor_commands,
    220220#endif
    221221      &rtems_monitor_commands[18],
  • c/src/libmisc/monitor/mon-object.c

    ree13a74 r63977bb4  
    130130            type = rtems_get_class(id);
    131131
    132         id = _Objects_Build_id(type, default_node, rtems_get_index(id));
     132        id = _Objects_Build_id(
     133          OBJECTS_CLASSIC_API, type, default_node, rtems_get_index(id));
    133134    }
    134135    return id;
     
    296297    rtems_monitor_union_t canonical;
    297298
    298     next_id = RTEMS_OBJECT_ID_INITIAL(info->type, rtems_monitor_default_node);
     299    next_id = RTEMS_OBJECT_ID_INITIAL(OBJECTS_CLASSIC_API, info->type, rtems_monitor_default_node);
    299300
    300301    while ((next_id = rtems_monitor_object_canonical_next(
  • c/src/libmisc/monitor/monitor.h

    ree13a74 r63977bb4  
    3737     * we like to have "types" for them anyway */
    3838   
    39     RTEMS_MONITOR_OBJECT_DRIVER    =  OBJECTS_CLASSES_LAST+1,
     39    RTEMS_MONITOR_OBJECT_DRIVER    =  OBJECTS_RTEMS_CLASSES_LAST+1,
    4040    RTEMS_MONITOR_OBJECT_DNAME,
    4141    RTEMS_MONITOR_OBJECT_CONFIG,
     
    290290             );
    291291
     292#if defined(__mips64)
     293    typedef unsigned64   rtems_monitor_command_arg_t;
     294#else
     295    typedef unsigned32   rtems_monitor_command_arg_t;
     296#endif
     297
    292298struct rtems_monitor_command_entry_s {
    293299    char        *command;      /* command name */
     
    296302    rtems_monitor_command_function_t command_function;
    297303                               /* Some argument for the command */
    298     unsigned32   command_arg;
     304    rtems_monitor_command_arg_t   command_arg;
    299305    struct rtems_monitor_command_entry_s *next;
    300306};
  • cpukit/libmisc/ChangeLog

    ree13a74 r63977bb4  
     12002-07-01      Joel Sherrill <joel@OARcorp.com>
     2
     3        * capture/capture-cli.c, cpuuse/cpuuse.c, monitor/mon-monitor.c,
     4        monitor/mon-object.c, monitor/monitor.h: Corrected use of
     5        _Objects_Information_table now that it is a two dimensional
     6        array based upon API and class.  In addition, in the monitor,
     7        corrected an error which occured when a target has 64 bit pointers.
     8
    192002-07-01      Joel Sherrill <joel@OARcorp.com>
    210
  • cpukit/libmisc/capture/capture-cli.c

    ree13a74 r63977bb4  
    574574                               rtems_id*      id)
    575575{
    576   Objects_Classes objclass;
     576  unsigned32 objclass;
    577577  int             l;
    578578  int             i;
     
    598598  objclass = _Objects_Get_class (*id);
    599599 
    600   if ((i == l) && (l > 4) &&
    601       ((objclass == OBJECTS_INTERNAL_THREADS) ||
    602        (objclass == OBJECTS_RTEMS_TASKS) ||
    603        (objclass == OBJECTS_POSIX_THREADS) ||
    604        (objclass == OBJECTS_ITRON_TASKS)))
     600  if ((i == l))
    605601    *valid_id = 1;
    606602  else
  • cpukit/libmisc/cpuuse/cpuuse.c

    ree13a74 r63977bb4  
    3232{
    3333  unsigned32           i;
    34   unsigned32           class_index;
     34  unsigned32           api_index;
    3535  Thread_Control      *the_thread;
    3636  Objects_Information *information;
     
    3939  unsigned32           total_units = 0;
    4040
    41   for ( class_index = OBJECTS_CLASSES_FIRST ;
    42         class_index <= OBJECTS_CLASSES_LAST ;
    43         class_index++ ) {
    44     information = _Objects_Information_table[ class_index ];
    45     if ( information && information->is_thread ) {
     41  for ( api_index = 1 ;
     42        api_index <= OBJECTS_APIS_LAST ;
     43        api_index++ ) {
     44    if ( !_Objects_Information_table[ api_index ] )
     45      continue;
     46    information = _Objects_Information_table[ api_index ][ 1 ];
     47    if ( information ) {
    4648      for ( i=1 ; i <= information->maximum ; i++ ) {
    4749        the_thread = (Thread_Control *)information->local_table[ i ];
     
    6062#endif
    6163
    62   for ( class_index = OBJECTS_CLASSES_FIRST ;
    63         class_index <= OBJECTS_CLASSES_LAST ;
    64         class_index++ ) {
    65     information = _Objects_Information_table[ class_index ];
    66     if ( information && information->is_thread ) {
     64  for ( api_index = 1 ;
     65        api_index <= OBJECTS_APIS_LAST ;
     66        api_index++ ) {
     67    if ( !_Objects_Information_table[ api_index ] )
     68      continue;
     69    information = _Objects_Information_table[ api_index ][ 1 ];
     70    if ( information ) {
    6771      for ( i=1 ; i <= information->maximum ; i++ ) {
    6872        the_thread = (Thread_Control *)information->local_table[ i ];
     
    114118{
    115119  unsigned32           i;
    116   unsigned32           class_index;
     120  unsigned32           api_index;
    117121  Thread_Control      *the_thread;
    118122  Objects_Information *information;
     
    120124  CPU_usage_Ticks_at_last_reset = _Watchdog_Ticks_since_boot;
    121125
    122   for ( class_index = OBJECTS_CLASSES_FIRST ;
    123         class_index <= OBJECTS_CLASSES_LAST ;
    124         class_index++ ) {
    125     information = _Objects_Information_table[ class_index ];
    126     if ( information && information->is_thread ) {
     126  for ( api_index = 1 ;
     127        api_index <= OBJECTS_APIS_LAST ;
     128        api_index++ ) {
     129    if ( !_Objects_Information_table[ api_index ] )
     130      continue;
     131    information = _Objects_Information_table[ api_index ][ 1 ];
     132    if ( information ) {
    127133      for ( i=1 ; i <= information->maximum ; i++ ) {
    128134        the_thread = (Thread_Control *)information->local_table[ i ];
  • cpukit/libmisc/monitor/mon-monitor.c

    ree13a74 r63977bb4  
    7070      0,
    7171      rtems_monitor_object_cmd,
    72       RTEMS_MONITOR_OBJECT_CONFIG,
     72      (rtems_monitor_command_arg_t) RTEMS_MONITOR_OBJECT_CONFIG,
    7373      &rtems_monitor_commands[1],
    7474    },
     
    7777      0,
    7878      rtems_monitor_object_cmd,
    79       RTEMS_MONITOR_OBJECT_INIT_TASK,
     79      (rtems_monitor_command_arg_t) RTEMS_MONITOR_OBJECT_INIT_TASK,
    8080      &rtems_monitor_commands[2],
    8181    },
     
    8484      0,
    8585      rtems_monitor_object_cmd,
    86       RTEMS_MONITOR_OBJECT_MPCI,
     86      (rtems_monitor_command_arg_t) RTEMS_MONITOR_OBJECT_MPCI,
    8787      &rtems_monitor_commands[3],
    8888    },
     
    128128      0,    /* XXX find a way to fix the compile time error on h8 */
    129129#else
    130       (unsigned32) &rtems_monitor_symbols,
     130      (rtems_monitor_command_arg_t) &rtems_monitor_symbols,
    131131#endif
    132132      &rtems_monitor_commands[8],
     
    138138      0,
    139139      rtems_monitor_object_cmd,
    140       RTEMS_MONITOR_OBJECT_EXTENSION,
     140      (rtems_monitor_command_arg_t) RTEMS_MONITOR_OBJECT_EXTENSION,
    141141      &rtems_monitor_commands[9],
    142142    },
     
    147147      0,
    148148      rtems_monitor_object_cmd,
    149       RTEMS_MONITOR_OBJECT_TASK,
     149      (rtems_monitor_command_arg_t) RTEMS_MONITOR_OBJECT_TASK,
    150150      &rtems_monitor_commands[10],
    151151    },
     
    156156      0,
    157157      rtems_monitor_object_cmd,
    158       RTEMS_MONITOR_OBJECT_QUEUE,
     158      (rtems_monitor_command_arg_t) RTEMS_MONITOR_OBJECT_QUEUE,
    159159      &rtems_monitor_commands[11],
    160160    },
     
    166166      0,
    167167      rtems_monitor_object_cmd,
    168       RTEMS_MONITOR_OBJECT_INVALID,
     168      (rtems_monitor_command_arg_t) RTEMS_MONITOR_OBJECT_INVALID,
    169169      &rtems_monitor_commands[12],
    170170    },
     
    174174      0,
    175175      rtems_monitor_object_cmd,
    176       RTEMS_MONITOR_OBJECT_DRIVER,
     176      (rtems_monitor_command_arg_t) RTEMS_MONITOR_OBJECT_DRIVER,
    177177      &rtems_monitor_commands[13],
    178178    },
     
    181181      0,
    182182      rtems_monitor_object_cmd,
    183       RTEMS_MONITOR_OBJECT_DNAME,
     183      (rtems_monitor_command_arg_t) RTEMS_MONITOR_OBJECT_DNAME,
    184184      &rtems_monitor_commands[14],
    185185    },
     
    190190      0,
    191191      rtems_monitor_fatal_cmd,
    192       RTEMS_SUCCESSFUL,
     192      (rtems_monitor_command_arg_t) RTEMS_SUCCESSFUL,
    193193      &rtems_monitor_commands[15],
    194194    },
     
    198198      0,
    199199      rtems_monitor_fatal_cmd,
    200       RTEMS_TASK_EXITTED,                       /* exit value */
     200      (rtems_monitor_command_arg_t) RTEMS_TASK_EXITTED,         /* exit value */
    201201      &rtems_monitor_commands[16],
    202202    },
     
    205205      0,
    206206      rtems_monitor_fatal_cmd,
    207       RTEMS_SUCCESSFUL,                         /* exit value */
     207      (rtems_monitor_command_arg_t) RTEMS_SUCCESSFUL,                           /* exit value */
    208208      &rtems_monitor_commands[17],
    209209    },
     
    217217      0,    /* XXX find a way to fix the compile time error on h8 */
    218218#else
    219       (unsigned32) rtems_monitor_commands,
     219      (rtems_monitor_command_arg_t) rtems_monitor_commands,
    220220#endif
    221221      &rtems_monitor_commands[18],
  • cpukit/libmisc/monitor/mon-object.c

    ree13a74 r63977bb4  
    130130            type = rtems_get_class(id);
    131131
    132         id = _Objects_Build_id(type, default_node, rtems_get_index(id));
     132        id = _Objects_Build_id(
     133          OBJECTS_CLASSIC_API, type, default_node, rtems_get_index(id));
    133134    }
    134135    return id;
     
    296297    rtems_monitor_union_t canonical;
    297298
    298     next_id = RTEMS_OBJECT_ID_INITIAL(info->type, rtems_monitor_default_node);
     299    next_id = RTEMS_OBJECT_ID_INITIAL(OBJECTS_CLASSIC_API, info->type, rtems_monitor_default_node);
    299300
    300301    while ((next_id = rtems_monitor_object_canonical_next(
  • cpukit/libmisc/monitor/monitor.h

    ree13a74 r63977bb4  
    3737     * we like to have "types" for them anyway */
    3838   
    39     RTEMS_MONITOR_OBJECT_DRIVER    =  OBJECTS_CLASSES_LAST+1,
     39    RTEMS_MONITOR_OBJECT_DRIVER    =  OBJECTS_RTEMS_CLASSES_LAST+1,
    4040    RTEMS_MONITOR_OBJECT_DNAME,
    4141    RTEMS_MONITOR_OBJECT_CONFIG,
     
    290290             );
    291291
     292#if defined(__mips64)
     293    typedef unsigned64   rtems_monitor_command_arg_t;
     294#else
     295    typedef unsigned32   rtems_monitor_command_arg_t;
     296#endif
     297
    292298struct rtems_monitor_command_entry_s {
    293299    char        *command;      /* command name */
     
    296302    rtems_monitor_command_function_t command_function;
    297303                               /* Some argument for the command */
    298     unsigned32   command_arg;
     304    rtems_monitor_command_arg_t   command_arg;
    299305    struct rtems_monitor_command_entry_s *next;
    300306};
Note: See TracChangeset for help on using the changeset viewer.