Home | History | Annotate | Download | only in mq_timedsend
      1 <assertions>
      2   <assertion id="1" tag="ref:XSH6:25950:25951 ref:XSH6:25968:25969 pt:MSG pt:TMO">
      3 mq_timedsend() places the message msg_ptr points to into message queue mqdes
      4   </assertion>
      5   <assertion id="2" tag="ref:XSH6:25951:25953 ref:XSH6:25968:25969 pt:MSG pt:TMO">
      6 mq_timedsend() will fail if msg_len, the message length, is not less than or
      7 equal to mq_attr->mq_msgsize.
      8   </assertion>
      9   <assertion id="3" tag="ref:XSH6:25954:25958 ref:XSH6:25968:25969 pt:MSG pt:TMO">
     10 mq_timedsend() will insert the message into the message queue according to
     11 msg_prio (if the message queue is not full):
     12 - Larger msg_prio values mean the message is inserted before those with
     13   lower values.
     14 - For messages with equal msg_prio values, the message is inserted after
     15   those.
     16   </assertion>
     17   <assertion id="4" tag="ref:XSH6:25958:25958 ref:XSH6:25968:25969 pt:MSG pt:TMO">
     18 msg_prio must be less than MQ_PRIO_MAX
     19   </assertion>
     20   <assertion id="5" tag="ref:XSH6:25969:25976 pt:MSG pt:TMO">
     21 If the message queue pointed to by msg_ptr is full and O_NONBLOCK is not
     22 set, then mq_timedsend() will block until it can place the message in the queue
     23 or until a signal interrupts mq_timedsend() or when the time specified by
     24 abs_timeout expires.
     25 
     26 abs_timeout refers to the absolute time at which the timeout will expire
     27 (current time meets or exceeds that time).
     28   </assertion>
     29   <assertion id="6" tag="ref:XSH6:25962:25965 ref:XSH6:25968:25969 pt:MSG pt:TMO">
     30 If there are greater than one threads which are waiting to place a message
     31 in the message queue, the thread which will be able to place its message
     32 when space is available is the one with the greatest priority that has been
     33 waiting the longest if Priority Scheduling is supported.  If not, then it
     34 is unspecified which thread is able to place its message.
     35   </assertion>
     36   <assertion id="7" tag="ref:XSH6:25965:25967 ref:XSH6:25968:25969 pt:MSG pt:TMO">
     37 If the message queue pointed to by msg_ptr is full and O_NONBLOCK is set,
     38 then mq_timedsend() will just return an error and the message will not
     39 be queued.
     40   </assertion>
     41   <assertion id="8" tag="ref:XSH6:25986:25987 ref:XSH6:25968:25969 pt:MSG pt:TMO">
     42 mq_timedsend() will return 0 on success.
     43   </assertion>
     44   <assertion id="9" tag="ref:XSH6:25988:25989 ref:XSH6:25968:25969 pt:MSG pt:TMO">
     45 mq_timedsend() will return -1 on failure, no message will be queued, and errno
     46 will be set.
     47   </assertion>
     48   <assertion id="10" tag="ref:XSH6:25992:25993 ref:XSH6:25968:25969 pt:MSG pt:TMO">
     49 mq_timedsend() will return EAGAIN if O_NONBLOCK is set and the message queue
     50 is full
     51   </assertion>
     52   <assertion id="11" tag="ref:XSH6:25994:25994 ref:XSH6:25968:25969 pt:MSG pt:TMO">
     53 mq_timedsend() will return EBADF if mqdes is not a valid message queue descriptor
     54 that is also open for writing
     55   </assertion>
     56   <assertion id="12" tag="ref:XSH6:25995:25995 ref:XSH6:25968:25969 pt:MSG pt:TMO">
     57 mq_timedsend() will return EINTR if it is interrupted by a signal
     58   </assertion>
     59   <assertion id="13" tag="ref:XSH6:25996:25996 ref:XSH6:25968:25969 pt:MSG pt:TMO">
     60 mq_timedsend() will return EINVAL if msg_prio wasn't in the valid range
     61   </assertion>
     62   <assertion id="14" tag="ref:XSH6:26000:26001 ref:XSH6:25968:25969 pt:MSG pt:TMO">
     63 mq_timedsend() will return EMSGSIZE if msg_len is greater than the message
     64 queues message size attribute
     65   </assertion>
     66   <assertion id="15" tag="ref:XSH6:25976:25977 pt:MSG pt:TMO">
     67 If abs_timeout has already passed at the time mq_timedsend is called, then the
     68 timeout shall expire.
     69   </assertion>
     70   <assertion id="16" tag="ref:XSH6:25978:25980 pt:MSG pt:TMO pt:TMR">
     71 If Timers is supported, then abs_timeout is based on CLOCK_REALTIME.
     72 Otherwise, the timeout is based on the system clock (time() function).
     73   </assertion>
     74   <assertion id="17" tag="ref:XSH6:25981:25981 pt:MSG pt:TMO">
     75 The timeout has the same resolution as the clock it's based on.
     76   </assertion>
     77   <assertion id="18" tag="ref:XSH6:25983:25985 pt:MSG pt:TMO">
     78 If the queue already has room, then mq_timedsend() should never fail.
     79 Also, in this case, abs_timeout doesn't need to be checked for validity.
     80   </assertion>
     81   <assertion id="19" tag="ref:XSH6:25997:25999 pt:MSG pt:TMO">
     82 mq_timedsend() will return EINVAL if the message queue was full and
     83 abs_timeout had a tv_nsec field less than 0 or greater than or equal
     84 to 1000 million.
     85   </assertion>
     86   <assertion id="20" tag="ref:XSH6:26002:26003 pt:MSG pt:TMO">
     87 mq_timedsend() will return ETIMEDOUT if O_NONBLOCK was not set when
     88 mq_open() was called for the message queue, but the message could not
     89 be added to the queue because it timed out
     90   </assertion>
     91 </assertions>
     92