Use of the information contained in this unapproved document is at your own risk
.Last update: 18 March,1997
1003.1b-93 #12 _____________________________________________________________________________ Interpretation Number: XXXX Topic: messages Relevant Sections: 2.2.2.65, 2.2.2.66 Interpretation Request: ----------------------- From: Andrew Josey (on behalf of the X/Open Base Working group) Part 1. Interpretation Request for: IEEE Std 1003.1b-1993 as contained in: ISO/IEC 9945-1:1996(E), ANSI/IEEE Std. 1003.1, 1996 Edition. Subsection 2.2.2.65, Page 20, Line 298. Question: The sentence "A message consists of a fixed-size message buffer." seems contradictory to the description of a message presented in subsections 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. ------------------------------------------------------------------------------- Part 2. Interpretation Request for: IEEE Std 1003.1b-1993 as contained in: ISO/IEC 9945-1:1996(E), ANSI/IEEE Std. 1003.1, 1996 Edition. Subsection 2.2.2.66, Page 20, Line 301-302. Question: 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 section 15.2.4 and received in section 15.2.5. Both of these subsections 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 section 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 ------------- 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. Forwarded to Interpretations group: Dec 9 1996 Finalised: 26th Feb 1997