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

5
Last change on this file since ef30eb1 was 36cd27c, checked in by Sebastian Huber <sebastian.huber@…>, on 04/19/16 at 12:12:06

score: Simplify _Objects_Get_next()

Remove unused location parameter.

  • Property mode set to 100644
File size: 993 bytes
Line 
1/*
2 * RTEMS Monitor "manager" support.
3 * Used to traverse object (chain) lists and print them out.
4 */
5
6#ifdef HAVE_CONFIG_H
7#include "config.h"
8#endif
9
10#include <rtems.h>
11#include <rtems/monitor.h>
12
13#include <stdio.h>
14
15/*
16 * "next" routine for all objects that are RTEMS manager objects
17 */
18
19const void *
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
30    /*
31     * When we are called, it must be local
32     */
33
34#if defined(RTEMS_MULTIPROCESSING)
35    if ( ! _Objects_Is_local_id(*next_id) )
36        goto done;
37#endif
38
39    object = _Objects_Get_next(*next_id, table, next_id);
40
41    if (object)
42    {
43        copy = (rtems_monitor_generic_t *) canonical;
44        copy->id = object->id;
45        copy->name = object->name.name_u32;
46    }
47
48#if defined(RTEMS_MULTIPROCESSING)
49done:
50#endif
51    return object;
52}
Note: See TracBrowser for help on using the repository browser.