OSDN Git Service

LDP: Update original to LDP v3.68
[linuxjm/LDP_man-pages.git] / original / man3 / usleep.3
index b4b70bc..d3ca5b3 100644 (file)
@@ -1,5 +1,6 @@
 .\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
 .\"
+.\" %%%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.
@@ -19,6 +20,7 @@
 .\"
 .\" Formatted or processed versions of this manual, if unaccompanied by
 .\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
 .\"
 .\" References consulted:
 .\"     Linux libc source code
@@ -28,7 +30,7 @@
 .\" Modified 2001-04-01 by aeb
 .\" Modified 2003-07-23 by aeb
 .\"
-.TH USLEEP 3  2010-09-20 "" "Linux Programmer's Manual"
+.TH USLEEP 3  2013-12-10 "" "Linux Programmer's Manual"
 .SH NAME
 usleep \- suspend execution for microsecond intervals
 .SH SYNOPSIS
@@ -65,13 +67,18 @@ _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED
 .SH DESCRIPTION
 The
 .BR usleep ()
-function suspends execution of the calling process for
+function suspends execution of the calling thread for
 (at least) \fIusec\fP microseconds.
 The sleep may be lengthened slightly
 by any system activity or by the time spent processing the call or by the
 granularity of system timers.
-.SH "RETURN VALUE"
-0 on success, \-1 on error.
+.SH RETURN VALUE
+The
+.BR usleep ()
+function returns 0 on success.
+On error, \-1 is returned, with
+.I errno
+set to indicate the cause of the error.
 .SH ERRORS
 .TP
 .B EINTR
@@ -81,7 +88,12 @@ Interrupted by a signal; see
 .B EINVAL
 \fIusec\fP is not smaller than 1000000.
 (On systems where that is considered an error.)
-.SH "CONFORMING TO"
+.SH ATTRIBUTES
+.SS Multithreading (see pthreads(7))
+The
+.BR usleep ()
+function is thread-safe.
+.SH CONFORMING TO
 4.3BSD, POSIX.1-2001.
 POSIX.1-2001 declares this function obsolete; use
 .BR nanosleep (2)
@@ -132,7 +144,7 @@ signal, and with other timer functions such as
 .BR timer_settime (2),
 .BR ualarm (3)
 is unspecified.
-.SH "SEE ALSO"
+.SH SEE ALSO
 .BR alarm (2),
 .BR getitimer (2),
 .BR nanosleep (2),
@@ -141,3 +153,12 @@ is unspecified.
 .BR sleep (3),
 .BR ualarm (3),
 .BR time (7)
+.SH COLOPHON
+This page is part of release 3.68 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/.