Home | History | Annotate | Download | only in clock_nanosleep
      1 <assertions>
      2   <assertion id="1" tag="ref:XSH6:6713:6717 pt:CS">
      3    clock_nanosleep() causes the current thread to stop executing for
      4    the time interval (clocked by clock_id) in rqtp unless:
      5    - TIMER_ABSTIME is set in the flags argument
      6    - a signal whose action is to invoke a signal catching function is
      7      delivered to the current thread
      8    - the process is terminated
      9   </assertion>
     10   <assertion id="2" tag="ref:XSH6:6718:6722 pt:CS">
     11    If TIMER_ABSTIME is set in flags, then clock_nanosleep() uses
     12    absolute time for the suspension of execution.  That is, it stops for:
     13    - the absolute time specified by rqtp
     14    or until
     15    - a signal whose action is to invoke a signal catching function is
     16      delivered to the current thread
     17    - the process is terminated
     18   </assertion>
     19   <assertion id="3" tag="ref:XSH6:6722:6724 pt:CS">
     20    If TIMER_ABSTIME is set in flags, then if, when clock_nanosleep() is
     21    called, rqtp time value less than or equal to specified clock\'s time value,
     22    clock_nanosleep() returns immediately and the calling process is *not*
     23    suspended.
     24   </assertion>
     25   <assertion id="4" tag="ref:XSH6:6725:6730 pt:CS">
     26    For TIMER_ABSTIME _not_ set:
     27    Suspension time is always greater than or equal to the rqtp time interval.
     28    [May be greater b/c of rounding or scheduling, just never less than.]
     29    Unless clock_nanosleep() is interrupted by a signal.
     30   </assertion>
     31   <assertion id="5" tag="ref:XSH6:6730:6733 pt:CS">
     32    For TIMER_ABSTIME set:
     33    Syspension time is always at least until the corresponding clock
     34    reaches time rqtp.
     35    Unless clock_nanosleep() is interrupted by a signal.
     36   </assertion>
     37   <assertion id="6" tag="ref:XSH6:6734:6735 pt:CS">
     38    clock_nanosleep() does not affect the action/blockage of a signal.
     39   </assertion>
     40   <assertion id="7" tag="ref:XSH6:6736:6737 pt:CS">
     41    clock_nanosleep() fails if clock_id is for the CPU-time clock of
     42    the calling thread
     43   </assertion>
     44   <assertion id="8" tag="ref:XSH6:6740:6741 pt:CS">
     45    clock_nanosleep() returns 0 on success (i.e., the full time requested
     46    by rqtp has elapsed)
     47   </assertion>
     48   <assertion id="9" tag="ref:XSH6:6743:6747 pt:CS">
     49    For relative clock_nanosleep(), if clock_nanosleep() is
     50    interrupted by a signal and rmtp is not-NULL, rmtp contains the
     51    amount of time remaining.  [If rmtp is NULL, no time is returned.]
     52    -- Absolute timers have no effect on rmtp.
     53   </assertion>
     54   <assertion id="10" tag="ref:XSH6:6751:6751 pt:CS">
     55    clock_nanosleep sets errno=EINTR if it was interrupted by a signal
     56   </assertion>
     57   <assertion id="11" tag="ref:XSH6:6752:6753 pt:CS">
     58    clock_nanosleep sets errno=EINVAL if rqpt below 0 or above (or equal to)
     59    1,000 million
     60   </assertion>
     61   <assertion id="12" tag="ref:XSH6:6753:6754 pt:CS">
     62    clock_nanosleep sets errno=EINVAL if TIMER_ABSTIME was specified
     63    and rqpt is outside the range for clock_id
     64   </assertion>
     65   <assertion id="13" tag="ref:XSH6:6755:6756 pt:CS">
     66    clock_nanosleep sets errno=EINVAL if clock_id does not refer to a known
     67    clock or refers to the CPU-time clock of the calling thread
     68   </assertion>
     69   <assertion id="14" tag="ref:XSH6:6757:6758 pt:CS">
     70    clock_nanosleep sets errno=ENOTSUP if clock_id refers to a clock
     71    that clock_nanosleep does not support (ex. if CPU-time clock is not
     72    supported)
     73   </assertion>
     74   <assertion id="15" tag="ref:XSH6:6762:6764 pt:CS">
     75    clock_nanosleep() with CLOCK_REALTIME == nanosleep()
     76   </assertion>
     77 </assertions>
     78