source: rtems/c/src/lib/libmisc/monitor/mon-manager.c @ 674c900

4.104.114.84.95
Last change on this file since 674c900 was 5beb562, checked in by Joel Sherrill <joel.sherrill@…>, on 09/21/97 at 16:58:57

Cleaned up as part of adding the Monitor test.

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