Home | History | Annotate | Download | only in nanosleep
      1 <assertions>
      2   <assertion id="1" tag="ref:XSH6:26693:26695">
      3    nanosleep() causes the current thread to be suspended until either:
      4     1) the time interval in rqtp passes
      5     2) a signal whose action is to terminate the process or invoke a signal
      6        catching function is delivered to the current thread
      7   </assertion>
      8   <assertion id="2" tag="ref:XSH6:26696:26699">
      9    Unless nanosleep() is interrupted (as in 2) above), nanosleep() must always
     10    suspend the process for _at least_ the time interval in rqtp - as
     11    measured by CLOCK_REALTIME.
     12    [Occasionally, the time could be > rqtp interval because of
     13    scheduling/rounding.]
     14   </assertion>
     15   <assertion id="3" tag="ref:XSH6:26700:26700">
     16    nanosleep() does not effect the action/blockage of a signal
     17   </assertion>
     18   <assertion id="4" tag="ref:XSH6:26702:26703">
     19    nanosleep() returns 0 if it returns because the time interval in rqtp
     20    has elapsed
     21   </assertion>
     22   <assertion id="5" tag="ref:XSH6:26709:26709 XSH6:26730:26730">
     23    nanosleep() returns -1 on failure or if interrupted
     24   </assertion>
     25   <assertion id="6" tag="ref:XSH6:26713:26714">
     26    nanosleep() sets errno to EINVAL if rqtp contained a nanosecond value
     27    below 0 or above (or equal to) 1,000 million
     28   </assertion>
     29   <assertion id="7" tag="ref:XSH6:26704:26708 XSH6:26712:26712">
     30    nanosleep() sets errno to EINTR if it is interrupted by a signal.
     31    Also, if rmtp != NULL, rmtp will be set to the time remaining (i.e.,
     32    requested time - time slept).  Otherwise, time remaining is not
     33    returned.
     34   </assertion>
     35 </assertions>
     36