diff options
Diffstat (limited to 'man2/nanosleep.2')
-rw-r--r-- | man2/nanosleep.2 | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/man2/nanosleep.2 b/man2/nanosleep.2 index a8d9f5a8a..1688f9013 100644 --- a/man2/nanosleep.2 +++ b/man2/nanosleep.2 @@ -28,7 +28,7 @@ Standard C library .P .RS -4 Feature Test Macro Requirements for glibc (see -.BR feature_test_macros (7)): +.MR feature_test_macros 7 ): .RE .P .BR nanosleep (): @@ -62,16 +62,16 @@ can then be used to call again and complete the specified pause (but see NOTES). .P The -.BR timespec (3) +.MR timespec 3 structure is used to specify intervals of time with nanosecond precision. .P The value of the nanoseconds field must be in the range [0, 999999999]. .P Compared to -.BR sleep (3) +.MR sleep 3 and -.BR usleep (3), +.MR usleep 3 , .BR nanosleep () has the following advantages: it provides a higher resolution for specifying the sleep interval; @@ -95,7 +95,7 @@ Problem with copying information from user space. .B EINTR The pause has been interrupted by a signal that was delivered to the thread (see -.BR signal (7)). +.MR signal 7 ). The remaining sleep time has been written into .I *rem @@ -122,7 +122,7 @@ clock. .\" Subject: nanosleep() uses CLOCK_MONOTONIC, should be CLOCK_REALTIME? .\" Date: 2008-06-22 07:35:41 GMT This probably does not matter, since the POSIX.1 specification for -.BR clock_settime (2) +.MR clock_settime 2 says that discontinuous changes in .B CLOCK_REALTIME should not affect @@ -132,7 +132,7 @@ should not affect Setting the value of the .B CLOCK_REALTIME clock via -.BR clock_settime (2) +.MR clock_settime 2 shall have no effect on threads that are blocked waiting for a relative time service based upon this clock, including the @@ -161,7 +161,7 @@ and is thus not available in Linux 2.6.0 and later kernels. If the interval specified in .I req 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. @@ -173,7 +173,7 @@ is repeatedly restarted after being interrupted by signals, since the time between the interruptions and restarts of the call will lead to drift in the time when the sleep finally completes. This problem can be avoided by using -.BR clock_nanosleep (2) +.MR clock_nanosleep 2 with an absolute time value. .SH BUGS If a program that catches signals and uses @@ -190,7 +190,7 @@ on successive restarts of the .BR nanosleep () call. To avoid such problems, use -.BR clock_nanosleep (2) +.MR clock_nanosleep 2 with the .B TIMER_ABSTIME flag to sleep to an absolute deadline. @@ -210,11 +210,11 @@ then the time that the thread spent in the stopped state is counted against the sleep interval. This problem is fixed in Linux 2.6.0 and later kernels. .SH SEE ALSO -.BR clock_nanosleep (2), -.BR restart_syscall (2), -.BR sched_setscheduler (2), -.BR timer_create (2), -.BR sleep (3), -.BR timespec (3), -.BR usleep (3), -.BR time (7) +.MR clock_nanosleep 2 , +.MR restart_syscall 2 , +.MR sched_setscheduler 2 , +.MR timer_create 2 , +.MR sleep 3 , +.MR timespec 3 , +.MR usleep 3 , +.MR time 7 |