xref: /titanic_50/usr/src/man/man3c/usleep.3c (revision 08eb19132eebba77347f1e2d5adac3f8d1e552ca)
1*08eb1913SGarrett D'Amore.\" Copyright 2014 Garrett D'Amore <garrett@damore.org>
2c10c16deSRichard Lowe.\" Copyright (c) 2008, Sun Microsystems, Inc. All Rights Reserved.
3c10c16deSRichard Lowe.\" Copyright (c) 1980 Regents of the University of California.  All rights reserved.  The Berkeley software License Agreement specifies the terms and conditions for redistribution.
4c10c16deSRichard Lowe.\" Portions Copyright (c) 1992, X/Open Company Limited  All Rights Reserved.
5c10c16deSRichard Lowe.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
6c10c16deSRichard Lowe.\" http://www.opengroup.org/bookstore/.
7c10c16deSRichard Lowe.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
8c10c16deSRichard Lowe.\"  This notice shall appear on any product containing this material.
9*08eb1913SGarrett D'Amore.Dd "Aug 16, 2014"
10*08eb1913SGarrett D'Amore.Dt USLEEP 3C
11*08eb1913SGarrett D'Amore.Os
12*08eb1913SGarrett D'Amore.Sh NAME
13*08eb1913SGarrett D'Amore.Nm usleep
14*08eb1913SGarrett D'Amore.Nd suspend execution for interval in microseconds
15*08eb1913SGarrett D'Amore.Sh SYNOPSIS
16*08eb1913SGarrett D'Amore.In unistd.h
17*08eb1913SGarrett D'Amore.Ft int
18*08eb1913SGarrett D'Amore.Fn usleep "useconds_t useconds"
19*08eb1913SGarrett D'Amore.Sh DESCRIPTION
20*08eb1913SGarrett D'AmoreThe
21*08eb1913SGarrett D'Amore.Fn usleep
22*08eb1913SGarrett D'Amorefunction suspends the caller from execution for the number
23*08eb1913SGarrett D'Amoreof microseconds specified by the
24*08eb1913SGarrett D'Amore.Fa useconds
25*08eb1913SGarrett D'Amoreargument. The actual suspension
26c10c16deSRichard Lowetime might be less than requested because any caught signal will terminate
27*08eb1913SGarrett D'Amore.Fn usleep
28*08eb1913SGarrett D'Amorefollowing execution of that signal's catching routine. The
29c10c16deSRichard Lowesuspension time might be longer than requested by an arbitrary amount because
30c10c16deSRichard Loweof the scheduling of other activity in the system.
31*08eb1913SGarrett D'Amore.Lp
32*08eb1913SGarrett D'AmoreIf the value of
33*08eb1913SGarrett D'Amore.Fa useconds
34*08eb1913SGarrett D'Amoreis 0, then the call has no effect.
35*08eb1913SGarrett D'Amore.Lp
36*08eb1913SGarrett D'AmoreThe use of the
37*08eb1913SGarrett D'Amoreusleep
38*08eb1913SGarrett D'Amorefunction has no effect on the action or blockage
39c10c16deSRichard Loweof any signal. In a multithreaded process, only the invoking thread is
40c10c16deSRichard Lowesuspended from execution.
41*08eb1913SGarrett D'Amore.Sh RETURN VALUES
42*08eb1913SGarrett D'AmoreOn completion,
43*08eb1913SGarrett D'Amore.Fn usleep
44*08eb1913SGarrett D'Amorereturns 0. There are no error returns.
45*08eb1913SGarrett D'Amore.Sh ERRORS
46c10c16deSRichard LoweNo errors are returned.
47*08eb1913SGarrett D'Amore.Sh USAGE
48*08eb1913SGarrett D'AmoreThe
49*08eb1913SGarrett D'Amore.Fn usleep
50*08eb1913SGarrett D'Amorefunction is included for its historical usage and is Obsolete.  The
51*08eb1913SGarrett D'Amore.Xr nanosleep 3C
52*08eb1913SGarrett D'Amorefunction is preferred over this function.
53*08eb1913SGarrett D'Amore.Sh INTERFACE STABILITY
54*08eb1913SGarrett D'Amore.Sy Obsolete Standard .
55*08eb1913SGarrett D'Amore.Sh MT-LEVEL
56*08eb1913SGarrett D'Amore.Sy Safe .
57*08eb1913SGarrett D'Amore.Sh SEE ALSO
58*08eb1913SGarrett D'Amore.Xr nanosleep 3C ,
59*08eb1913SGarrett D'Amore.Xr sleep 3C ,
60*08eb1913SGarrett D'Amore.Xr unistd.h 3HEAD ,
61*08eb1913SGarrett D'Amore.Xr standards 5
62*08eb1913SGarrett D'Amore.Sh STANDARDS
63*08eb1913SGarrett D'AmoreThe
64*08eb1913SGarrett D'Amore.Fn usleep
65*08eb1913SGarrett D'Amorefunction is available in the following compilation environments.  See
66*08eb1913SGarrett D'Amore.Xr standards 5 .
67*08eb1913SGarrett D'Amore.Lp
68*08eb1913SGarrett D'Amore.Bl -bullet -compact
69*08eb1913SGarrett D'Amore.It
70*08eb1913SGarrett D'Amore.St -xpg4.2
71*08eb1913SGarrett D'Amore.It
72*08eb1913SGarrett D'Amore.St -susv2
73*08eb1913SGarrett D'Amore.It
74*08eb1913SGarrett D'Amore.St -susv3
75*08eb1913SGarrett D'Amore.El
76*08eb1913SGarrett D'Amore.Lp
77*08eb1913SGarrett D'AmoreIt is marked obsolete in
78*08eb1913SGarrett D'Amore.St -susv3 , and was removed from
79*08eb1913SGarrett D'Amore.St -p1003.1-2008 .
80