Answering questions that may arise related to the meaning of portions of an IEEE standard concerning specific applications.

IEEE Standards Interpretations for IEEE Std 1003.1b™-1993 IEEE Standard for Information Technology - Portable Operating System Interfaces (POSIX(R)) - Part 1: System Application Program Interface (API) - Amendment 1: Realtime Extension [C language]

Copyright © 1996 by the Institute of Electrical and Electronics Engineers, Inc. 3 Park Avenue New York, New York 10016-5997 USA All Rights Reserved.

Interpretations are issued to explain and clarify the intent of a standard and do not constitute an alteration to the original standard. In addition, interpretations are not intended to supply consulting information. Permission is hereby granted to download and print one copy of this document. Individuals seeking permission to reproduce and/or distribute this document in its entirety or portions of this document must contact the IEEE Standards Department for the appropriate license. Use of the information contained in this document is at your own risk.

IEEE Standards Department Copyrights and Permissions 445 Hoes Lane, Piscataway, New Jersey 08855-1331, USA

Interpretation Request #12
Topic: message Relevant Clauses:,

1) The sentence "A message consists of a fixed-size message buffer." seems contradictory to the description of a message presented in 15.2.4 and 15.2.5 (Interfaces to send and receive a message). When a message is sent, the size of the message buffer is not fixed, but is user specified for each message sent. When a message is received, the size of the buffer into which the message is to be fetched is effectively fixed by the mq_msgsize attribute of the message queue (although the user may specify a larger buffer, with no apparent benefit), but each message so received is of variable size, with the size returned by mq_receive(). Therefore, can it be that a message "consists" of a fixed-size message buffer? Suggested Correction: Change the sentence to "The size of a message is variable but limited to a fixed maximum size established at the time the associated message queue is created.

2) The sentence "Messages may be removed in the order in which they were added or in priority order." implies (because of the "or") that it is the user's option as to how messages are removed, independent of how they were queued. This is contradictory to the way messages are described as queued in 15.2.4 and received in 15.2.5. Both of these subclauses are clear that messages are queued FIFO within priority, and may be removed only in the order found in the queue (i.e. oldest of the highest priority messages first). There is no option to remove messages in the order they were added if they were queued with different priorities. Therefore, is the sentence quoted above technically correct? Suggested Correction: Change the sentence to "When all messages in a message queue are of the same priority, messages are removed from the queue in the order in which they were added to the queue. When messages in a message queue are of different priorities, messages are removed in priority order, first-in-first-out (FIFO) within the same priority.

Interpretation Response
The standard is very clear in 15.2.4 lines 255-260 on the precise ordering of the messages. The definition allows this particular behavior and notes that the precise characteristics are determined by the interface and characteristics of the queue. It is the view of the interpretations committee that no further clarification is needed.

Rationale for Interpretation
The definition is clear enough without going into the details of the precise order that is the current interface. Since additional interfaces may be defined in the future, it is not viewed as advisable to unnecessarily constrain the definition.