source: rtems/c/src/libmisc/monitor/mon-manager.c @ 0836603

4.104.114.84.95
Last change on this file since 0836603 was be95da0, checked in by Joel Sherrill <joel.sherrill@…>, on 09/18/96 at 20:55:13

casts added to numerous arguments, prototypes corrected, and
proper include files added.

  • Property mode set to 100644
File size: 986 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 "monitor.h"
10
11#include <stdio.h>
12
13#include <monitor.h>
14
15/*
16 * "next" routine for all objects that are RTEMS manager objects
17 */
18
19void *
20rtems_monitor_manager_next(
21    void      *table_void,
22    void      *canonical,
23    rtems_id  *next_id
24)
25{
26    Objects_Information     *table = table_void;
27    rtems_monitor_generic_t *copy;
28    Objects_Control         *object = 0;
29    Objects_Locations        location;
30
31    /*
32     * When we are called, it must be local
33     */
34       
35    if ( ! _Objects_Is_local_id(*next_id))
36        goto done;
37   
38    object = _Objects_Get_next(table, *next_id, &location, next_id);
39
40    if (object)
41    {
42        copy = (rtems_monitor_generic_t *) canonical;
43        copy->id = object->id;
44        _Objects_Copy_name_raw(object->name, &copy->name, sizeof(copy->name));
45    }   
46   
47done:
48    return object;
49}
50
Note: See TracBrowser for help on using the repository browser.