OSDN Git Service

LDP: Update original to LDP v3.79
[linuxjm/LDP_man-pages.git] / original / man2 / clock_nanosleep.2
index 6c37d67..e24c7ee 100644 (file)
@@ -1,6 +1,7 @@
 .\" Copyright (c) 2008, Linux Foundation, written by Michael Kerrisk
 .\" <mtk.manpages@gmail.com>
 .\"
+.\" %%%LICENSE_START(VERBATIM)
 .\" Permission is granted to make and distribute verbatim copies of this
 .\" manual provided the copyright notice and this permission notice are
 .\" preserved on all copies.
@@ -20,8 +21,9 @@
 .\"
 .\" Formatted or processed versions of this manual, if unaccompanied by
 .\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
 .\"
-.TH CLOCK_NANOSLEEP 2 2010-12-03 "Linux" "Linux Programmer's Manual"
+.TH CLOCK_NANOSLEEP 2 2014-12-31 "Linux" "Linux Programmer's Manual"
 .SH NAME
 clock_nanosleep \- high-resolution sleep with specifiable clock
 .SH SYNOPSIS
@@ -33,7 +35,7 @@ clock_nanosleep \- high-resolution sleep with specifiable clock
 .BI "                    struct timespec *" remain );
 .fi
 .sp
-Link with \fI\-lrt\fP.
+Link with \fI\-lrt\fP (only for glibc versions before 2.17).
 .sp
 .ad l
 .in -4n
@@ -94,6 +96,12 @@ by all threads in the process.
 See
 .BR clock_getres (2)
 for further details on these clocks.
+In addition, the CPU clock IDs returned by
+.BR clock_getcpuclockid (3)
+and
+.BR pthread_getcpuclockid (3)
+can also be passed in
+.IR clock_id .
 
 If
 .I flags
@@ -141,7 +149,7 @@ it returns the remaining unslept time in
 This value can then be used to call
 .BR clock_nanosleep ()
 again and complete a (relative) sleep.
-.SH "RETURN VALUE"
+.SH RETURN VALUE
 On successfully sleeping for the requested interval,
 .BR clock_nanosleep ()
 returns 0.
@@ -176,7 +184,7 @@ The
 .BR clock_nanosleep ()
 system call first appeared in Linux 2.6.
 Support is available in glibc since version 2.1.
-.SH "CONFORMING TO"
+.SH CONFORMING TO
 POSIX.1-2001.
 .SH NOTES
 If the interval specified in
@@ -206,7 +214,7 @@ flag.
 is never restarted after being interrupted by a signal handler,
 regardless of the use of the
 .BR sigaction (2)
-.B SA_SIGACTION
+.B SA_RESTART
 flag.
 
 The
@@ -242,10 +250,20 @@ clock via
 .BR clock_settime (2)
 shall have no effect on a thread that is blocked on a relative
 .BR clock_nanosleep ().
-.SH "SEE ALSO"
+.SH SEE ALSO
 .BR clock_getres (2),
 .BR nanosleep (2),
+.BR restart_syscall (2),
 .BR timer_create (2),
 .BR sleep (3),
 .BR usleep (3),
 .BR time (7)
+.SH COLOPHON
+This page is part of release 3.79 of the Linux
+.I man-pages
+project.
+A description of the project,
+information about reporting bugs,
+and the latest version of this page,
+can be found at
+\%http://www.kernel.org/doc/man\-pages/.