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

4.104.114.84.95
Last change on this file since f26145b was 6ca6ef40, checked in by Joel Sherrill <joel.sherrill@…>, on 11/01/04 at 16:35:42

2004-11-01 Joel Sherrill <joel@…>

  • libmisc/monitor/mon-manager.c, libmisc/monitor/mon-object.c: Remove references to _Object_Is_local in single processor configurations.
  • Property mode set to 100644
File size: 1.2 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 defined(RTEMS_MULTIPROCESSING)
38    if ( ! _Objects_Is_local_id(*next_id) )
39        goto done;
40#endif
41
42    object = _Objects_Get_next(table, *next_id, &location, next_id);
43
44    if (object)
45    {
46        copy = (rtems_monitor_generic_t *) canonical;
47        copy->id = object->id;
48                if(table->is_string)
49            _Objects_Copy_name_raw(object->name, &copy->name, sizeof(copy->name));
50        else
51                _Objects_Copy_name_raw(&object->name, &copy->name, sizeof(copy->name));
52        }
53
54#if defined(RTEMS_MULTIPROCESSING)
55done:
56#endif
57    return object;
58}
Note: See TracBrowser for help on using the repository browser.