| <assertions> |
| <assertion id="1" tag="ref:XSH6:25950:25951 pt:MSG"> |
| mq_send() places the message msg_ptr points to into message queue mqdes |
| </assertion> |
| <assertion id="2" tag="ref:XSH6:25951:25953 pt:MSG"> |
| mq_send() will fail if msg_len, the message length, is not less than or |
| equal to mq_attr->mq_msgsize. |
| </assertion> |
| <assertion id="3" tag="ref:XSH6:25954:25958 pt:MSG"> |
| mq_send() will insert the message into the message queue according to |
| msg_prio (if the message queue is not full): |
| - Larger msg_prio values mean the message is inserted before those with |
| lower values. |
| - For messages with equal msg_prio values, the message is inserted after |
| those. |
| </assertion> |
| <assertion id="4" tag="ref:XSH6:25958:25958 pt:MSG"> |
| msg_prio must be less than MQ_PRIO_MAX |
| </assertion> |
| <assertion id="5" tag="ref:XSH6:25959:25961 pt:MSG"> |
| If the message queue pointed to by msg_ptr is full and O_NONBLOCK is not |
| set, then mq_send() will block until it can place the message in the queue |
| or until a signal interrupts mq_send(). |
| </assertion> |
| <assertion id="6" tag="ref:XSH6:25962:25965 pt:MSG"> |
| If there are greater than one threads which are waiting to place a message |
| in the message queue, the thread which will be able to place its message |
| when space is available is the one with the greatest priority that has been |
| waiting the longest if Priority Scheduling is supported. If not, then it |
| is unspecified which thread is able to place its message. |
| </assertion> |
| <assertion id="7" tag="ref:XSH6:25965:25967 pt:MSG"> |
| If the message queue pointed to by msg_ptr is full and O_NONBLOCK is set, |
| then mq_send() will just return an error and the message will not be queued. |
| </assertion> |
| <assertion id="8" tag="ref:XSH6:25986:25987 pt:MSG"> |
| mq_send() will return 0 on success. |
| </assertion> |
| <assertion id="9" tag="ref:XSH6:25988:25989 pt:MSG"> |
| mq_send() will return -1 on failure, no message will be queued, and errno |
| will be set. |
| </assertion> |
| <assertion id="10" tag="ref:XSH6:25992:25993 pt:MSG"> |
| mq_send() will return EAGAIN if O_NONBLOCK is set and the message queue |
| is full |
| </assertion> |
| <assertion id="11" tag="ref:XSH6:25994:25994 pt:MSG"> |
| mq_send() will return EBADF if mqdes is not a valid message queue descriptor |
| that is also open for writing |
| </assertion> |
| <assertion id="12" tag="ref:XSH6:25995:25995 pt:MSG"> |
| mq_send() will return EINTR if it is interrupted by a signal |
| </assertion> |
| <assertion id="13" tag="ref:XSH6:25996:25996 pt:MSG"> |
| mq_send() will return EINVAL if msg_prio wasn't in the valid range |
| </assertion> |
| <assertion id="14" tag="ref:XSH6:26000:26001 pt:MSG"> |
| mq_send() will return EMSGSIZE if msg_len is greater than the message |
| queues message size attribute |
| </assertion> |
| </assertions> |