OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

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

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

Line No. Rev Author Line
1 30 unneback
/*
2
 *  $Id: mon-queue.c,v 1.2 2001-09-27 12:01:43 chris Exp $
3
 */
4
 
5
#include <rtems.h>
6
#include <rtems/monitor.h>
7
 
8
#include <stdio.h>
9
 
10
void
11
rtems_monitor_queue_canonical(
12
    rtems_monitor_queue_t *canonical_queue,
13
    void                  *queue_void
14
)
15
{
16
    Message_queue_Control *rtems_queue = (Message_queue_Control *) queue_void;
17
 
18
    canonical_queue->attributes = rtems_queue->attribute_set;
19
    canonical_queue->maximum_message_size = rtems_queue->message_queue.maximum_message_size;
20
    canonical_queue->maximum_pending_messages = rtems_queue->message_queue.maximum_pending_messages;
21
    canonical_queue->number_of_pending_messages = rtems_queue->message_queue.number_of_pending_messages;
22
}
23
 
24
void
25
rtems_monitor_queue_dump_header(
26
    boolean verbose
27
)
28
{
29
    printf("\
30
  ID       NAME   ATTRIBUTES   PEND   MAXPEND  MAXSIZE\n");
31
/*23456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789
32
 
33
    rtems_monitor_separator();
34
}
35
 
36
 
37
/*
38
 * Dump out the "next" queue indicated by 'id'.
39
 * Returns next one to check.
40
 * Returns RTEMS_OBJECT_ID_FINAL when all done
41
 */
42
 
43
void
44
rtems_monitor_queue_dump(
45
    rtems_monitor_queue_t *monitor_queue,
46
    boolean  verbose
47
)
48
{
49
    unsigned32            length = 0;
50
 
51
    length += rtems_monitor_dump_id(monitor_queue->id);
52
    length += rtems_monitor_pad(11, length);
53
    length += rtems_monitor_dump_name(monitor_queue->name);
54
    length += rtems_monitor_pad(19, length);
55
    length += rtems_monitor_dump_attributes(monitor_queue->attributes);
56
    length += rtems_monitor_pad(31, length);
57
    length += rtems_monitor_dump_decimal(monitor_queue->number_of_pending_messages);
58
    length += rtems_monitor_pad(39, length);
59
    length += rtems_monitor_dump_decimal(monitor_queue->maximum_pending_messages);
60
    length += rtems_monitor_pad(48, length);
61
    length += rtems_monitor_dump_decimal(monitor_queue->maximum_message_size);
62
 
63
    printf("\n");
64
}

powered by: WebSVN 2.1.0

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