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

4.104.114.84.95
Last change on this file since aed742c was aed742c, checked in by Ralf Corsepius <ralf.corsepius@…>, on 04/16/04 at 12:06:28

Remove stray white spaces.

  • Property mode set to 100644
File size: 1.1 KB
Line 
1/*
2 * RTEMS Monitor "manager" support.
3 * Used to traverse object (chain) lists and print them out.
4 *
5 *  $Id$
6 */
7
8#ifdef HAVE_CONFIG_H
9#include "config.h"
10#endif
11
12#include <rtems.h>
13#include <rtems/monitor.h>
14
15#include <stdio.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    Objects_Locations        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                if(table->is_string)
47            _Objects_Copy_name_raw(object->name, &copy->name, sizeof(copy->name));
48        else
49                _Objects_Copy_name_raw(&object->name, &copy->name, sizeof(copy->name));
50        }
51
52done:
53    return object;
54}
Note: See TracBrowser for help on using the repository browser.