blob: db5734d572dfc36416c561d4596746f872c07f07 [file] [log] [blame]
<assertions>
<assertion id="1" tag="ref:XSH6:25852:25852 ref:XSH6:25855:25856 pt:MSG">
mq_receive() receive the oldest of the highest priority message(s) from the message queue specified by mqdes. The selected message will be removed from the queue and copied to the buffer pointed to by the msg_ptr argument.
</assertion>
<assertion id="2" tag="ref:XSH6:25853:25854 pt:MSG">
mq_receive() will fail and return an error if the size of the buffer in bytes, specified by the msg_len argument, is less than the mq_msgsize attribute of the message queue.
</assertion>
<assertion id="3" tag="ref:XSH6:25857:25857 pt:MSG">
if msg_len is greater than SSIZE_MAX, the result is implementation-defined.
</assertion>
<assertion id="4" tag="ref:XSH6:25858:25859 pt:MSG">
If msg_prio is not NULL, the priority of the selected message will be stored in the location referenced by msg_prio.
</assertion>
<assertion id="5" tag="ref:XSH6:25860:25861 pt:MSG">
If the specified message queue is empty and O_NONBLOCK is not set, then mq_receive() will block until a message is enqueued on the message queue or until a signal interrupts mq_receive().
</assertion>
<assertion id="6" tag="ref:XSH6:25862:25865 pt:MSG">
If there are more than one thread waiting to receive a message when a message arrives at an empty queue and the Priority Scheduling option is supported, then the thread with highest priority that has been waiting the longest will receive the message. If Priority Scheduling option is not supported, then it is unspecified which waiting thread is able to receive the message.
</assertion>
<assertion id="7" tag="ref:XSH6:25866:25868 pt:MSG">
If the specified message queue is empty and O_NONBLOCK is set, no message will be removed from the queue, and mq_receive() will return an error.
</assertion>
<assertion id="8" tag="ref:XSH6:25888:25889 pt:MSG">
mq_receive() will return the length of the selected message in bytes and the message will be removed from the queue on success.
</assertion>
<assertion id="9" tag="ref:XSH6:25890:25891 pt:MSG">
mq_receive() will return -1 on failure, nomessage will be removed from the queue, and the errno will be set.
</assertion>
<assertion id="10" tag="ref:XSH6:25894:25895 pt:MSG">
mq_receive() will return EAGAIN if O_NONBLOCK is set and the message queue is empty.
</assertion>
<assertion id="11" tag="ref:XSH6:25896:25896 pt:MSG">
mq_receive() will return EBADF if mqdes is not a valid message queue descriptor open for reading.
</assertion>
<assertion id="12" tag="ref:XSH6:25897:25898 pt:MSG">
mq_receive() will return EMSGSIZE if the specified buffer size, msg_len, is less than the message size attribute of the message queue.
</assertion>
<assertion id="13" tag="ref:XSH6:25899:25899 pt:MSG">
mq_receive() will return EINTR if it is interrupted by a signal
</assertion>
<assertion id="14" tag="ref:XSH6:25906:25907 pt:MSG">
mq_receive() will return EBADMSG if the implementation has detected a data corruption problem with the message.
</assertion>
</assertions>