Changeset 72c440e in rtems for c/src/lib/libmisc


Ignore:
Timestamp:
Jan 17, 1996, 8:13:45 PM (25 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
97dde60
Parents:
217e398
Message:

Update from Tony Bennett (tbennett@…)

Location:
c/src/lib/libmisc/monitor
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libmisc/monitor/mon-dname.c

    r217e398 r72c440e  
    11/*
    2  *      @(#)dname.c     1.3 - 95/07/31
     2 *      @(#)dname.c     1.5 - 96/01/03
    33 *     
    44 *
     
    5555{
    5656    int n = rtems_get_index(*next_id);
    57     rtems_driver_name_t    *table = object_information;
     57    rtems_driver_name_t    *table = _IO_Driver_name_table;
    5858    rtems_driver_name_t    *np = 0;
    5959
  • c/src/lib/libmisc/monitor/mon-itask.c

    r217e398 r72c440e  
    11/*
    2  *      @(#)itask.c     1.4 - 95/08/02
     2 *      @(#)itask.c     1.6 - 96/01/03
    33 *     
    44 *
    5  * RTEMS Monitor init task support
     5 *  RTEMS Monitor init task support
    66 *
    77 *  $Id$
  • c/src/lib/libmisc/monitor/mon-manager.c

    r217e398 r72c440e  
    11/*
    2  *      @(#)manager.c   1.2 - 95/07/31
     2 *      @(#)manager.c   1.4 - 96/01/03
    33 *     
    44 *
    5  * RTEMS Monitor "manager" support.
    6  * Used to traverse object (chain) lists and print them out.
     5 *  RTEMS Monitor "manager" support.
     6 *  Used to traverse object (chain) lists and print them out.
     7 *
    78 *  $Id$
    89 */
     
    4445        copy = (rtems_monitor_generic_t *) canonical;
    4546        copy->id = object->id;
    46         copy->name = table->name_table[rtems_get_index(copy->id)];
     47        _Objects_Copy_name_raw(object->name, &copy->name, sizeof(copy->name));
    4748    }   
    4849   
  • c/src/lib/libmisc/monitor/mon-monitor.c

    r217e398 r72c440e  
    11/*
    2  *      @(#)monitor.c   1.22 - 95/11/02
     2 *      @(#)monitor.c   1.23 - 96/01/03
    33 *     
    44 *
     
    8181      "  extension -- user extensions\n"
    8282      "  driver    -- show information about named drivers\n"
     83      "  dname     -- show information about named drivers\n"
    8384      "  object    -- generic object information\n"
    8485      "  node      -- specify default node for commands that take id's\n"
     
    9697      0,
    9798      rtems_monitor_object_cmd,
    98       RTEMS_OBJECT_CONFIG,
     99      RTEMS_MONITOR_OBJECT_CONFIG,
    99100    },
    100101    { "itask",
     
    103104      0,
    104105      rtems_monitor_object_cmd,
    105       RTEMS_OBJECT_INIT_TASK,
     106      RTEMS_MONITOR_OBJECT_INIT_TASK,
    106107    },
    107108   { "mpci",
     
    110111      0,
    111112      rtems_monitor_object_cmd,
    112       RTEMS_OBJECT_MPCI,
     113      RTEMS_MONITOR_OBJECT_MPCI,
    113114    },
    114115    { "pause",
     
    156157      0,
    157158      rtems_monitor_object_cmd,
    158       RTEMS_OBJECT_EXTENSION,
     159      RTEMS_MONITOR_OBJECT_EXTENSION,
    159160    },
    160161    { "task",
     
    164165      0,
    165166      rtems_monitor_object_cmd,
    166       RTEMS_OBJECT_TASK,
     167      RTEMS_MONITOR_OBJECT_TASK,
    167168    },
    168169    { "queue",
     
    172173      0,
    173174      rtems_monitor_object_cmd,
    174       RTEMS_OBJECT_QUEUE,
     175      RTEMS_MONITOR_OBJECT_QUEUE,
    175176    },
    176177    { "object",
     
    181182      0,
    182183      rtems_monitor_object_cmd,
    183       RTEMS_OBJECT_INVALID,
     184      RTEMS_MONITOR_OBJECT_INVALID,
    184185    },
    185186    { "driver",
     
    188189      0,
    189190      rtems_monitor_object_cmd,
    190       RTEMS_OBJECT_DRIVER,
     191      RTEMS_MONITOR_OBJECT_DRIVER,
    191192    },
    192193    { "dname",
     
    195196      0,
    196197      rtems_monitor_object_cmd,
    197       RTEMS_OBJECT_DNAME,
     198      RTEMS_MONITOR_OBJECT_DNAME,
    198199    },
    199200    { "exit",
  • c/src/lib/libmisc/monitor/mon-object.c

    r217e398 r72c440e  
    11/*
    2  *      @(#)object.c    1.7 - 95/08/02
     2 *      @(#)object.c    1.9 - 96/01/03
    33 *     
    44 *
     
    3636rtems_monitor_object_info_t rtems_monitor_object_info[] =
    3737{
    38     { RTEMS_OBJECT_CONFIG,
     38    { RTEMS_MONITOR_OBJECT_CONFIG,
    3939      (void *) 0,
    4040      sizeof(rtems_monitor_config_t),
     
    4444      (rtems_monitor_object_dump_fn)        rtems_monitor_config_dump,
    4545    },
    46     { RTEMS_OBJECT_MPCI,
     46    { RTEMS_MONITOR_OBJECT_MPCI,
    4747      (void *) 0,
    4848      sizeof(rtems_monitor_mpci_t),
     
    5252      (rtems_monitor_object_dump_fn)        rtems_monitor_mpci_dump,
    5353    },
    54     { RTEMS_OBJECT_INIT_TASK,
     54    { RTEMS_MONITOR_OBJECT_INIT_TASK,
    5555      (void *) 0,
    5656      sizeof(rtems_monitor_init_task_t),
     
    6060      (rtems_monitor_object_dump_fn)        rtems_monitor_init_task_dump,
    6161    },
    62     { RTEMS_OBJECT_TASK,
     62    { RTEMS_MONITOR_OBJECT_TASK,
    6363      (void *) &_RTEMS_tasks_Information,
    6464      sizeof(rtems_monitor_task_t),
     
    6868      (rtems_monitor_object_dump_fn)        rtems_monitor_task_dump,
    6969    },
    70     { RTEMS_OBJECT_QUEUE,
     70    { RTEMS_MONITOR_OBJECT_QUEUE,
    7171      (void *) &_Message_queue_Information,
    7272      sizeof(rtems_monitor_queue_t),
     
    7676      (rtems_monitor_object_dump_fn)        rtems_monitor_queue_dump,
    7777    },
    78     { RTEMS_OBJECT_EXTENSION,
     78    { RTEMS_MONITOR_OBJECT_EXTENSION,
    7979      (void *) &_Extension_Information,
    8080      sizeof(rtems_monitor_extension_t),
     
    8484      (rtems_monitor_object_dump_fn)        rtems_monitor_extension_dump,
    8585    },
    86     { RTEMS_OBJECT_DRIVER,
     86    { RTEMS_MONITOR_OBJECT_DRIVER,
    8787      (void *) 0,
    8888      sizeof(rtems_monitor_driver_t),
     
    9292      (rtems_monitor_object_dump_fn)        rtems_monitor_driver_dump,
    9393    },
    94     { RTEMS_OBJECT_DNAME,
     94    { RTEMS_MONITOR_OBJECT_DNAME,
    9595      /* XXX now that the driver name table is allocated from the */
    9696      /* XXX Workspace, this does not work */
     
    114114    rtems_id            id,
    115115    unsigned32          default_node,
    116     rtems_object_type_t type
     116    rtems_monitor_object_type_t type
    117117)
    118118{
     
    122122    if (node == 0)
    123123    {
    124 #if 0
    125         /* XXX Uncomment this when types are added to id's */
    126124        if (rtems_get_class(id) != OBJECTS_NO_CLASS)
    127125            type = rtems_get_class(id);
    128126
    129127        id = _Objects_Build_id(type, default_node, rtems_get_index(id));
    130 #else
    131 #warning "TONY... FIX ME!!!!!"
    132 #if defined(hppa1_1)
    133 #warning "TONY... I SAID TO FIX ME!!!!!  <HAHAHAHAHA>"
    134 #endif
    135         id = _Objects_Build_id(0, default_node, rtems_get_index(id));
    136 #endif
    137128    }
    138129    return id;
     
    142133rtems_monitor_object_info_t *
    143134rtems_monitor_object_lookup(
    144     rtems_object_type_t type
     135    rtems_monitor_object_type_t type
    145136)
    146137{
     
    158149rtems_id
    159150rtems_monitor_object_canonical_next_remote(
    160     rtems_object_type_t type,
     151    rtems_monitor_object_type_t type,
    161152    rtems_id            id,
    162153    void               *canonical
     
    234225rtems_id
    235226rtems_monitor_object_canonical_get(
    236     rtems_object_type_t  type,
     227    rtems_monitor_object_type_t  type,
    237228    rtems_id             id,
    238229    void                *canonical,
     
    300291    rtems_monitor_union_t canonical;
    301292
    302     next_id = RTEMS_OBJECT_ID_INITIAL(rtems_monitor_default_node);
     293    next_id = RTEMS_OBJECT_ID_INITIAL(info->type, rtems_monitor_default_node);
    303294
    304295    while ((next_id = rtems_monitor_object_canonical_next(
     
    321312    int arg;
    322313    rtems_monitor_object_info_t *info = 0;
    323     rtems_object_type_t          type = (rtems_object_type_t) command_arg;
     314    rtems_monitor_object_type_t  type = (rtems_monitor_object_type_t) command_arg;
    324315   
    325316    /* what is the default type? */
    326     type = (rtems_object_type_t) command_arg;
     317    type = (rtems_monitor_object_type_t) command_arg;
    327318
    328319    if (argc == 1)
    329320    {
    330         if (type == RTEMS_OBJECT_INVALID)
     321        if (type == RTEMS_MONITOR_OBJECT_INVALID)
    331322        {
    332323            printf("A type must be specified to \"dump all\"\n");
     
    345336    {
    346337        unsigned32          default_node = rtems_monitor_default_node;
    347         rtems_object_type_t last_type = RTEMS_OBJECT_INVALID;
     338        rtems_monitor_object_type_t last_type = RTEMS_MONITOR_OBJECT_INVALID;
    348339        rtems_id            id;
    349340
     
    352343            id = (rtems_id) strtoul(argv[arg], 0, 0);
    353344            id = rtems_monitor_id_fixup(id, default_node, type);
    354 #if 0
    355             type = rtems_get_type(id);
    356 #endif
     345            type = (rtems_monitor_object_type_t) rtems_get_class(id);
     346
    357347            /*
    358348             * Allow the item type to change in the middle
     
    364354                info = rtems_monitor_object_lookup(type);
    365355                if (info == 0)
    366                 {
    367 not_found:          printf("Invalid or unsupported type %d\n", type);
    368                     goto done;
    369                 }
     356                    goto not_found;
    370357           
    371358                if (info->dump_header)
     
    373360            }
    374361
     362            if (info == 0)
     363            {
     364not_found:      printf("Invalid or unsupported type %d\n", type);
     365                goto done;
     366            }
     367
    375368            rtems_monitor_object_dump_1(info, id, verbose);
    376369
  • c/src/lib/libmisc/monitor/mon-server.c

    r217e398 r72c440e  
    11/*
    2  *      @(#)server.c    1.3 - 95/08/02
     2 *      @(#)server.c    1.5 - 96/01/03
    33 *     
    44 *
    5  * RTEMS monitor server (handles requests for info from RTEMS monitors
     5 *  RTEMS monitor server (handles requests for info from RTEMS monitors
    66 *             running on other nodes)
    77 *
     
    145145            case RTEMS_MONITOR_SERVER_CANONICAL:
    146146            {
    147                 rtems_object_type_t object_type;
     147                rtems_monitor_object_type_t object_type;
    148148                rtems_id            id;
    149149                rtems_id            next_id;
    150150
    151                 object_type = (rtems_object_type_t) request.argument0;
     151                object_type = (rtems_monitor_object_type_t) request.argument0;
    152152                id          = (rtems_id)            request.argument1;
    153153                next_id = rtems_monitor_object_canonical_get(object_type,
  • c/src/lib/libmisc/monitor/monitor.h

    r217e398 r72c440e  
    11/*
    2  *      @(#)monitor.h   1.20 - 95/12/12
     2 *      @(#)monitor.h   1.21 - 96/01/03
    33 *     
    44 *
    5  *  $Id$
     5 *  monitor.h,v 1.3 1995/09/29 17:19:02 joel Exp
    66 */
    77
     
    3030
    3131typedef enum {
    32     RTEMS_OBJECT_INVALID   =  0,
    33     RTEMS_OBJECT_TASK      =  1,
    34     RTEMS_OBJECT_EXTENSION =  2,
    35     RTEMS_OBJECT_QUEUE     =  3,
    36     RTEMS_OBJECT_SEMAPHORE =  4,
    37     RTEMS_OBJECT_DRIVER    =  5,
    38     RTEMS_OBJECT_DNAME     =  6,
    39     RTEMS_OBJECT_CONFIG    =  7,
    40     RTEMS_OBJECT_INIT_TASK =  8,
    41     RTEMS_OBJECT_MPCI      =  9,
    42     RTEMS_OBJECT_PARTITION = 10,
    43     RTEMS_OBJECT_REGION    = 11,
    44     RTEMS_OBJECT_PORT      = 12,
    45     RTEMS_OBJECT_SYMBOL    = 13,
    46 } rtems_object_type_t;
     32    RTEMS_MONITOR_OBJECT_INVALID   =  OBJECTS_NO_CLASS,
     33    RTEMS_MONITOR_OBJECT_TASK      =  OBJECTS_RTEMS_TASKS,
     34    RTEMS_MONITOR_OBJECT_EXTENSION =  OBJECTS_RTEMS_EXTENSIONS,
     35    RTEMS_MONITOR_OBJECT_QUEUE     =  OBJECTS_RTEMS_MESSAGE_QUEUES,
     36    RTEMS_MONITOR_OBJECT_SEMAPHORE =  OBJECTS_RTEMS_SEMAPHORES,
     37    RTEMS_MONITOR_OBJECT_PARTITION =  OBJECTS_RTEMS_PARTITIONS,
     38    RTEMS_MONITOR_OBJECT_REGION    =  OBJECTS_RTEMS_REGIONS,
     39    RTEMS_MONITOR_OBJECT_PORT      =  OBJECTS_RTEMS_PORTS,
     40
     41    /* following monitor objects are not known to RTEMS, but
     42     * we like to have "types" for them anyway */
     43   
     44    RTEMS_MONITOR_OBJECT_DRIVER    =  OBJECTS_CLASSES_LAST+1,
     45    RTEMS_MONITOR_OBJECT_DNAME,
     46    RTEMS_MONITOR_OBJECT_CONFIG,
     47    RTEMS_MONITOR_OBJECT_INIT_TASK,
     48    RTEMS_MONITOR_OBJECT_MPCI,
     49    RTEMS_MONITOR_OBJECT_SYMBOL,
     50} rtems_monitor_object_type_t;
    4751
    4852/*
     
    303307
    304308typedef struct {
    305     rtems_object_type_t                 type;
     309    rtems_monitor_object_type_t                 type;
    306310    void                               *object_information;
    307311    int                                 size;   /* of canonical object */
     
    355359
    356360/* object.c */
    357 rtems_id   rtems_monitor_id_fixup(rtems_id, unsigned32, rtems_object_type_t);
    358 rtems_id   rtems_monitor_object_canonical_get(rtems_object_type_t, rtems_id, void *, unsigned32 *size_p);
     361rtems_id   rtems_monitor_id_fixup(rtems_id, unsigned32, rtems_monitor_object_type_t);
     362rtems_id   rtems_monitor_object_canonical_get(rtems_monitor_object_type_t, rtems_id, void *, unsigned32 *size_p);
    359363rtems_id   rtems_monitor_object_canonical_next(rtems_monitor_object_info_t *, rtems_id, void *);
    360364void      *rtems_monitor_object_next(void *, void *, rtems_id, rtems_id *);
Note: See TracChangeset for help on using the changeset viewer.