source: rtems/cpukit/libmisc/monitor/mon-queue.c @ 738a9ae

4.104.114.84.95
Last change on this file since 738a9ae was 550c3df7, checked in by Ralf Corsepius <ralf.corsepius@…>, on 07/08/03 at 08:39:16

2003-07-08 Ralf Corsepius <corsepiu@…>

  • capture/capture-cli.c: Add config-header support.
  • capture/capture.c: Add config-header support.
  • cpuuse/cpuuse.c: Add config-header support.
  • devnull/devnull.c: Add config-header support.
  • dummy/dummy.c: Add config-header support.
  • dumpbuf/dumpbuf.c: Add config-header support.
  • monitor/mon-command.c: Add config-header support.
  • monitor/mon-config.c: Add config-header support.
  • monitor/mon-dname.c: Add config-header support.
  • monitor/mon-driver.c: Add config-header support.
  • monitor/mon-extension.c: Add config-header support.
  • monitor/mon-itask.c: Add config-header support.
  • monitor/mon-manager.c: Add config-header support.
  • monitor/mon-monitor.c: Add config-header support.
  • monitor/mon-mpci.c: Add config-header support.
  • monitor/mon-object.c: Add config-header support.
  • monitor/mon-prmisc.c: Add config-header support.
  • monitor/mon-queue.c: Add config-header support.
  • monitor/mon-server.c: Add config-header support.
  • monitor/mon-symbols.c: Add config-header support.
  • monitor/mon-task.c: Add config-header support.
  • mw-fb/mw_fb.c: Add config-header support.
  • mw-fb/mw_uid.c: Add config-header support.
  • rtmonuse/rtmonuse.c: Add config-header support.
  • serdbg/serdbg.c: Add config-header support.
  • serdbg/serdbgio.c: Add config-header support.
  • serdbg/termios_printk.c: Add config-header support.
  • shell/cmds.c: Add config-header support.
  • stackchk/check.c: Add config-header support.
  • untar/untar.c: Add config-header support.
  • Property mode set to 100644
File size: 1.9 KB
Line 
1/*
2 *  $Id$
3 */
4
5#ifdef HAVE_CONFIG_H
6#include "config.h"
7#endif
8
9#include <rtems.h>
10#include <rtems/monitor.h>
11
12#include <stdio.h>
13
14void
15rtems_monitor_queue_canonical(
16    rtems_monitor_queue_t *canonical_queue,
17    void                  *queue_void
18)
19{
20    Message_queue_Control *rtems_queue = (Message_queue_Control *) queue_void;
21
22    canonical_queue->attributes = rtems_queue->attribute_set;
23    canonical_queue->maximum_message_size = rtems_queue->message_queue.maximum_message_size;
24    canonical_queue->maximum_pending_messages = rtems_queue->message_queue.maximum_pending_messages;
25    canonical_queue->number_of_pending_messages = rtems_queue->message_queue.number_of_pending_messages;
26}
27
28void
29rtems_monitor_queue_dump_header(
30    boolean verbose
31)
32{
33    printf("\
34  ID       NAME   ATTRIBUTES   PEND   MAXPEND  MAXSIZE\n");
35/*23456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789
360         1         2         3         4         5         6         7       */
37    rtems_monitor_separator();
38}
39
40
41/*
42 * Dump out the "next" queue indicated by 'id'.
43 * Returns next one to check.
44 * Returns RTEMS_OBJECT_ID_FINAL when all done
45 */
46
47void
48rtems_monitor_queue_dump(
49    rtems_monitor_queue_t *monitor_queue,
50    boolean  verbose
51)
52{
53    unsigned32            length = 0;
54
55    length += rtems_monitor_dump_id(monitor_queue->id);
56    length += rtems_monitor_pad(11, length);
57    length += rtems_monitor_dump_name(monitor_queue->name);
58    length += rtems_monitor_pad(19, length);
59    length += rtems_monitor_dump_attributes(monitor_queue->attributes);
60    length += rtems_monitor_pad(31, length);
61    length += rtems_monitor_dump_decimal(monitor_queue->number_of_pending_messages);
62    length += rtems_monitor_pad(39, length);
63    length += rtems_monitor_dump_decimal(monitor_queue->maximum_pending_messages);
64    length += rtems_monitor_pad(48, length);
65    length += rtems_monitor_dump_decimal(monitor_queue->maximum_message_size);
66
67    printf("\n");
68}
Note: See TracBrowser for help on using the repository browser.