summaryrefslogtreecommitdiffstats
path: root/man2/clock_nanosleep.2
diff options
context:
space:
mode:
Diffstat (limited to 'man2/clock_nanosleep.2')
-rw-r--r--man2/clock_nanosleep.242
1 files changed, 21 insertions, 21 deletions
diff --git a/man2/clock_nanosleep.2 b/man2/clock_nanosleep.2
index 5bda50e18..ff751e6fb 100644
--- a/man2/clock_nanosleep.2
+++ b/man2/clock_nanosleep.2
@@ -25,7 +25,7 @@ Real-time library
.P
.RS -4
Feature Test Macro Requirements for glibc (see
-.BR feature_test_macros (7)):
+.MR feature_test_macros 7 ):
.RE
.P
.BR clock_nanosleep ():
@@ -34,7 +34,7 @@ Feature Test Macro Requirements for glibc (see
.fi
.SH DESCRIPTION
Like
-.BR nanosleep (2),
+.MR nanosleep 2 ,
.BR clock_nanosleep ()
allows the calling thread to sleep for an interval specified
with nanosecond precision.
@@ -44,7 +44,7 @@ and in allowing the sleep interval to be specified as
either an absolute or a relative value.
.P
The time values passed to and returned by this call are specified using
-.BR timespec (3)
+.MR timespec 3
structures.
.P
The
@@ -79,12 +79,12 @@ by all threads in the process.
.\" to deal with the CLOCK_PROCESS_CPUTIME_ID case.
.P
See
-.BR clock_getres (2)
+.MR clock_getres 2
for further details on these clocks.
In addition, the CPU clock IDs returned by
-.BR clock_getcpuclockid (3)
+.MR clock_getcpuclockid 3
and
-.BR pthread_getcpuclockid (3)
+.MR pthread_getcpuclockid 3
can also be passed in
.IR clockid .
.\" Sleeping against CLOCK_REALTIME_ALARM and CLOCK_BOOTTIME_ALARM
@@ -153,7 +153,7 @@ specified an invalid address.
.TP
.B EINTR
The sleep was interrupted by a signal handler; see
-.BR signal (7).
+.MR signal 7 .
.TP
.B EINVAL
The value in the
@@ -182,18 +182,18 @@ glibc 2.1.
If the interval specified in
.I request
is not an exact multiple of the granularity underlying clock (see
-.BR time (7)),
+.MR time 7 ),
then the interval will be rounded up to the next multiple.
Furthermore, after the sleep completes, there may still be a delay before
the CPU becomes free to once again execute the calling thread.
.P
Using an absolute timer is useful for preventing
timer drift problems of the type described in
-.BR nanosleep (2).
+.MR nanosleep 2 .
(Such problems are exacerbated in programs that try to restart
a relative sleep that is repeatedly interrupted by signals.)
To perform a relative sleep that avoids these problems, call
-.BR clock_gettime (2)
+.MR clock_gettime 2
for the desired clock,
add the desired interval to the returned time value,
and then call
@@ -205,7 +205,7 @@ flag.
.BR clock_nanosleep ()
is never restarted after being interrupted by a signal handler,
regardless of the use of the
-.BR sigaction (2)
+.MR sigaction 2
.B SA_RESTART
flag.
.P
@@ -226,7 +226,7 @@ has no effect on signals dispositions or the signal mask.
POSIX.1 specifies that after changing the value of the
.B CLOCK_REALTIME
clock via
-.BR clock_settime (2),
+.MR clock_settime 2 ,
the new clock value shall be used to determine the time
at which a thread blocked on an absolute
.BR clock_nanosleep ()
@@ -239,15 +239,15 @@ POSIX.1 specifies that
changing the value of the
.B CLOCK_REALTIME
clock via
-.BR clock_settime (2)
+.MR clock_settime 2
shall have no effect on a thread that is blocked on a relative
.BR clock_nanosleep ().
.SH SEE ALSO
-.BR clock_getres (2),
-.BR nanosleep (2),
-.BR restart_syscall (2),
-.BR timer_create (2),
-.BR sleep (3),
-.BR timespec (3),
-.BR usleep (3),
-.BR time (7)
+.MR clock_getres 2 ,
+.MR nanosleep 2 ,
+.MR restart_syscall 2 ,
+.MR timer_create 2 ,
+.MR sleep 3 ,
+.MR timespec 3 ,
+.MR usleep 3 ,
+.MR time 7