]> git.saurik.com Git - apple/libc.git/blobdiff - gen/FreeBSD/usleep.3
Libc-1082.50.1.tar.gz
[apple/libc.git] / gen / FreeBSD / usleep.3
index 72fb09815a624169d3dc34a23f4f8e90d0702993..e99b773da51ff826173c0670a2b0794b02468ba1 100644 (file)
@@ -9,10 +9,6 @@
 .\" 2. Redistributions in binary form must reproduce the above copyright
 .\"    notice, this list of conditions and the following disclaimer in the
 .\"    documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\"    must display the following acknowledgement:
-.\"    This product includes software developed by the University of
-.\"    California, Berkeley and its contributors.
 .\" 4. Neither the name of the University nor the names of its contributors
 .\"    may be used to endorse or promote products derived from this software
 .\"    without specific prior written permission.
 .\" SUCH DAMAGE.
 .\"
 .\"     @(#)usleep.3   8.1 (Berkeley) 6/4/93
-.\" $FreeBSD: src/lib/libc/gen/usleep.3,v 1.18 2002/12/29 00:59:09 mike Exp $
+.\" $FreeBSD: src/lib/libc/gen/usleep.3,v 1.19 2007/01/09 00:27:56 imp Exp $
 .\"
 .Dd February 13, 1998
 .Dt USLEEP 3
 .Os
 .Sh NAME
 .Nm usleep
-.Nd suspend process execution for an interval measured in microseconds
+.Nd suspend thread execution for an interval measured in microseconds
 .Sh LIBRARY
 .Lb libc
 .Sh SYNOPSIS
 .In unistd.h
 .Ft int
-.Fn usleep "useconds_t microseconds"
+.Fo usleep
+.Fa "useconds_t useconds"
+.Fc
 .Sh DESCRIPTION
 The
 .Fn usleep
-function suspends execution of the calling process until either
-.Fa microseconds
-microseconds have elapsed or a signal is delivered to the process and its
-action is to invoke a signal-catching function or to terminate the
-process.
-System activity may lengthen the sleep by an indeterminate amount.
+function suspends execution of the calling thread until either
+.Fa useconds
+microseconds have elapsed
+or a signal is delivered to the thread whose action
+is to invoke a signal-catching function
+or to terminate the thread or process.
+The actual time slept may be longer, due to system latencies
+and possible limitations in the timer resolution of the hardware.
 .Pp
-This function is implemented using
-.Xr nanosleep 2
+This function is implemented, using
+.Xr nanosleep 2 ,
 by pausing for
-.Fa microseconds
+.Fa useconds
 microseconds or until a signal occurs.
 Consequently, in this implementation,
-sleeping has no effect on the state of process timers,
+sleeping has no effect on the state of process timers
 and there is no special handling for SIGALRM.
 .Sh RETURN VALUES
 .Rv -std usleep