blob: 4f47b8ac05257643d69ba6cdd7a6a94f6ca5c2a2 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
/*
* RTEMS Monitor "manager" support.
* Used to traverse object (chain) lists and print them out.
*
* $Id$
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <rtems.h>
#include <rtems/monitor.h>
#include <stdio.h>
/*
* "next" routine for all objects that are RTEMS manager objects
*/
void *
rtems_monitor_manager_next(
void *table_void,
void *canonical,
rtems_id *next_id
)
{
Objects_Information *table = table_void;
rtems_monitor_generic_t *copy;
Objects_Control *object = 0;
Objects_Locations location;
/*
* When we are called, it must be local
*/
if ( ! _Objects_Is_local_id(*next_id))
goto done;
object = _Objects_Get_next(table, *next_id, &location, next_id);
if (object)
{
copy = (rtems_monitor_generic_t *) canonical;
copy->id = object->id;
if(table->is_string)
_Objects_Copy_name_raw(object->name, ©->name, sizeof(copy->name));
else
_Objects_Copy_name_raw(&object->name, ©->name, sizeof(copy->name));
}
done:
return object;
}
|