File indexing completed on 2025-05-11 08:24:18
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034 #ifdef HAVE_CONFIG_H
0035 #include "config.h"
0036 #endif
0037
0038 #include <rtems.h>
0039 #include <rtems/monitor.h>
0040 #include <rtems/rtems/messageimpl.h>
0041
0042 #include <stdio.h>
0043
0044 void
0045 rtems_monitor_queue_canonical(
0046 rtems_monitor_queue_t *canonical_queue,
0047 const void *queue_void
0048 )
0049 {
0050 const Message_queue_Control *rtems_queue = (const Message_queue_Control *) queue_void;
0051
0052 canonical_queue->attributes = 0;
0053
0054 if (
0055 rtems_queue->message_queue.operations
0056 == &_Thread_queue_Operations_priority
0057 ) {
0058 canonical_queue->attributes |= RTEMS_PRIORITY;
0059 }
0060
0061 #if defined(RTEMS_MULTIPROCESSING)
0062 if ( rtems_queue->is_global ) {
0063 canonical_queue->attributes |= RTEMS_GLOBAL;
0064 }
0065 #endif
0066
0067 canonical_queue->maximum_message_size = rtems_queue->message_queue.maximum_message_size;
0068 canonical_queue->maximum_pending_messages = rtems_queue->message_queue.maximum_pending_messages;
0069 canonical_queue->number_of_pending_messages = rtems_queue->message_queue.number_of_pending_messages;
0070 }
0071
0072 void
0073 rtems_monitor_queue_dump_header(
0074 bool verbose RTEMS_UNUSED
0075 )
0076 {
0077 fprintf(stdout,"\
0078 ID NAME ATTRIBUTES PEND MAXPEND MAXSIZE\n");
0079
0080
0081 rtems_monitor_separator();
0082 }
0083
0084
0085
0086
0087
0088
0089
0090
0091 void
0092 rtems_monitor_queue_dump(
0093 rtems_monitor_queue_t *monitor_queue,
0094 bool verbose RTEMS_UNUSED
0095 )
0096 {
0097 uint32_t length = 0;
0098
0099 length += rtems_monitor_dump_id(monitor_queue->id);
0100 length += rtems_monitor_pad(11, length);
0101 length += rtems_monitor_dump_name(monitor_queue->id);
0102 length += rtems_monitor_pad(19, length);
0103 length += rtems_monitor_dump_attributes(monitor_queue->attributes);
0104 length += rtems_monitor_pad(31, length);
0105 length += rtems_monitor_dump_decimal(monitor_queue->number_of_pending_messages);
0106 length += rtems_monitor_pad(39, length);
0107 length += rtems_monitor_dump_decimal(monitor_queue->maximum_pending_messages);
0108 length += rtems_monitor_pad(48, length);
0109 length += rtems_monitor_dump_decimal(monitor_queue->maximum_message_size);
0110
0111 fprintf(stdout,"\n");
0112 }