source: rtems/c/src/lib/libmisc/monitor/mon-queue.c @ 1587af6

4.104.114.84.95
Last change on this file since 1587af6 was 5beb562, checked in by Joel Sherrill <joel.sherrill@…>, on 09/21/97 at 16:58:57

Cleaned up as part of adding the Monitor test.

  • Property mode set to 100644
File size: 1.9 KB
Line 
1/*
2 *  $Id$
3 */
4
5#include <rtems.h>
6#include <rtems/monitor.h>
7
8#include <stdio.h>
9
10void
11rtems_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
24void
25rtems_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
320         1         2         3         4         5         6         7       */
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
43void
44rtems_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}
Note: See TracBrowser for help on using the repository browser.