OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [libmisc/] [monitor/] [mon-manager.c] - Blame information for rev 173

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 30 unneback
/*
2
 * RTEMS Monitor "manager" support.
3
 * Used to traverse object (chain) lists and print them out.
4
 *
5
 *  $Id: mon-manager.c,v 1.2 2001-09-27 12:01:43 chris Exp $
6
 */
7
 
8
#include <rtems.h>
9
#include <rtems/monitor.h>
10
 
11
#include <stdio.h>
12
 
13
/*
14
 * "next" routine for all objects that are RTEMS manager objects
15
 */
16
 
17
void *
18
rtems_monitor_manager_next(
19
    void      *table_void,
20
    void      *canonical,
21
    rtems_id  *next_id
22
)
23
{
24
    Objects_Information     *table = table_void;
25
    rtems_monitor_generic_t *copy;
26
    Objects_Control         *object = 0;
27
    Objects_Locations        location;
28
 
29
    /*
30
     * When we are called, it must be local
31
     */
32
 
33
    if ( ! _Objects_Is_local_id(*next_id))
34
        goto done;
35
 
36
    object = _Objects_Get_next(table, *next_id, &location, next_id);
37
 
38
    if (object)
39
    {
40
        copy = (rtems_monitor_generic_t *) canonical;
41
        copy->id = object->id;
42
        _Objects_Copy_name_raw(object->name, &copy->name, sizeof(copy->name));
43
    }
44
 
45
done:
46
    return object;
47
}
48
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.