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

Subversion Repositories openrisc

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

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 30 unneback
/*
2
 * RTEMS Monitor extension support
3
 *
4
 *  $Id: mon-extension.c,v 1.2 2001-09-27 12:01:43 chris Exp $
5
 */
6
 
7
#include <rtems.h>
8
#include <rtems/monitor.h>
9
 
10
#include <stdio.h>
11
 
12
void
13
rtems_monitor_extension_canonical(
14
    rtems_monitor_extension_t *canonical_extension,
15
    void                  *extension_void
16
)
17
{
18
    Extension_Control     *rtems_extension = (Extension_Control *) extension_void;
19
    rtems_extensions_table *e = &rtems_extension->Extension.Callouts;
20
 
21
    rtems_monitor_symbol_canonical_by_value(&canonical_extension->e_create,
22
                                            (void *) e->thread_create);
23
 
24
    rtems_monitor_symbol_canonical_by_value(&canonical_extension->e_start,
25
                                            (void *) e->thread_start);
26
    rtems_monitor_symbol_canonical_by_value(&canonical_extension->e_restart,
27
                                            (void *) e->thread_restart);
28
    rtems_monitor_symbol_canonical_by_value(&canonical_extension->e_delete,
29
                                            (void *) e->thread_delete);
30
    rtems_monitor_symbol_canonical_by_value(&canonical_extension->e_tswitch,
31
                                            (void *) e->thread_switch);
32
    rtems_monitor_symbol_canonical_by_value(&canonical_extension->e_begin,
33
                                            (void *) e->thread_begin);
34
    rtems_monitor_symbol_canonical_by_value(&canonical_extension->e_exitted,
35
                                            (void *) e->thread_exitted);
36
    rtems_monitor_symbol_canonical_by_value(&canonical_extension->e_fatal,
37
                                            (void *) e->fatal);
38
}
39
 
40
void
41
rtems_monitor_extension_dump_header(
42
    boolean verbose
43
)
44
{
45
    printf("\
46
  ID       NAME\n");
47
/*23456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789
48
 
49
 
50
    rtems_monitor_separator();
51
}
52
 
53
 
54
/*
55
 * Dump out the canonical form
56
 */
57
 
58
void
59
rtems_monitor_extension_dump(
60
    rtems_monitor_extension_t *monitor_extension,
61
    boolean  verbose
62
)
63
{
64
    unsigned32           length = 0;
65
 
66
    length += rtems_monitor_dump_id(monitor_extension->id);
67
    length += rtems_monitor_pad(11, length);
68
    length += rtems_monitor_dump_name(monitor_extension->name);
69
 
70
    length += rtems_monitor_pad(18, length);
71
    length += printf("create: ");
72
    length += rtems_monitor_symbol_dump(&monitor_extension->e_create, verbose);
73
    length += printf(";  start: ");
74
    length += rtems_monitor_symbol_dump(&monitor_extension->e_start, verbose);
75
    length += printf(";  restart: ");
76
    length += rtems_monitor_symbol_dump(&monitor_extension->e_restart, verbose);
77
    length += printf("\n");
78
    length = 0;
79
 
80
    length += rtems_monitor_pad(18, length);
81
    length += printf("delete: ");
82
    length += rtems_monitor_symbol_dump(&monitor_extension->e_delete, verbose);
83
    length += printf(";  switch: ");
84
    length += rtems_monitor_symbol_dump(&monitor_extension->e_tswitch, verbose);
85
    length += printf(";  begin: ");
86
    length += rtems_monitor_symbol_dump(&monitor_extension->e_begin, verbose);
87
    length += printf("\n");
88
    length = 0;
89
 
90
    length += rtems_monitor_pad(18, length);
91
    length += printf("exitted: ");
92
    length += rtems_monitor_symbol_dump(&monitor_extension->e_exitted, verbose);
93
    length += printf(";  fatal: ");
94
    length += rtems_monitor_symbol_dump(&monitor_extension->e_fatal, verbose);
95
    length += printf("\n");
96
    length = 0;
97
    printf("\n");
98
}

powered by: WebSVN 2.1.0

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