source: rtems/c/src/lib/libmisc/monitor/mon-manager.c @ 72c440e

4.104.114.84.95
Last change on this file since 72c440e was 72c440e, checked in by Joel Sherrill <joel.sherrill@…>, on 01/17/96 at 20:13:45

Update from Tony Bennett (tbennett@…)

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