ABSTRACT

Message queues are the primary means of interthread communication in ThreadX. ThreadX places no constraints on how message queues are used. Message queues can be created to support a variety of message sizes. The number of messages a queue can hold depends on its message size and the size of the memory area supplied during creation. To calculate the total message capacity of the queue, divide the number of bytes in each message into the total number of bytes in the supplied memory area. Application threads can suspend while attempting to send or receive a message from a queue. The characteristics of each message queue are found in its Control Block. It contains information such as the message size, total message capacity, number of messages in the queue, available queue storage space, and number of threads suspended on this message queue. Message queues provide a powerful tool for interthread communication. Message queues provide a powerful tool for interthread communication.