source: rtems/cpukit/libmisc/monitor/mon-manager.c @ b06e68ef

4.104.114.84.95
Last change on this file since b06e68ef was b06e68ef, checked in by Joel Sherrill <joel.sherrill@…>, on Aug 17, 1995 at 7:51:51 PM

Numerous miscellaneous features incorporated from Tony Bennett
(tbennett@…) including the following major additions:

+ variable length messages
+ named devices
+ debug monitor
+ association tables/variables

  • Property mode set to 100644
File size: 1010 bytes
Line 
1/*
2 *      @(#)manager.c   1.2 - 95/07/31
3 *     
4 *
5 * RTEMS Monitor "manager" support.
6 * Used to traverse object (chain) lists and print them out.
7 *  $Id$
8 */
9
10#include <rtems.h>
11#include "monitor.h"
12
13#include <stdio.h>
14
15#include <monitor.h>
16
17/*
18 * "next" routine for all objects that are RTEMS manager objects
19 */
20
21void *
22rtems_monitor_manager_next(
23    void      *table_void,
24    void      *canonical,
25    rtems_id  *next_id
26)
27{
28    Objects_Information     *table = table_void;
29    rtems_monitor_generic_t *copy;
30    Objects_Control         *object = 0;
31    unsigned32               location;
32
33    /*
34     * When we are called, it must be local
35     */
36       
37    if ( ! _Objects_Is_local_id(*next_id))
38        goto done;
39   
40    object = _Objects_Get_next(table, *next_id, &location, next_id);
41
42    if (object)
43    {
44        copy = (rtems_monitor_generic_t *) canonical;
45        copy->id = object->id;
46        copy->name = table->name_table[rtems_get_index(copy->id)];
47    }   
48   
49done:
50    return object;
51}
52
Note: See TracBrowser for help on using the repository browser.