OSDN Git Service

3075811108ed187787204bc1b9373e8bc9bbeaad
[linuxjm/LDP_man-pages.git] / release / man3 / usleep.3
1 .\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
2 .\"
3 .\" Permission is granted to make and distribute verbatim copies of this
4 .\" manual provided the copyright notice and this permission notice are
5 .\" preserved on all copies.
6 .\"
7 .\" Permission is granted to copy and distribute modified versions of this
8 .\" manual under the conditions for verbatim copying, provided that the
9 .\" entire resulting derived work is distributed under the terms of a
10 .\" permission notice identical to this one.
11 .\"
12 .\" Since the Linux kernel and libraries are constantly changing, this
13 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
14 .\" responsibility for errors or omissions, or for damages resulting from
15 .\" the use of the information contained herein.  The author(s) may not
16 .\" have taken the same level of care in the production of this manual,
17 .\" which is licensed free of charge, as they might when working
18 .\" professionally.
19 .\"
20 .\" Formatted or processed versions of this manual, if unaccompanied by
21 .\" the source, must acknowledge the copyright and authors of this work.
22 .\"
23 .\" References consulted:
24 .\"     Linux libc source code
25 .\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
26 .\"     386BSD man pages
27 .\" Modified 1993-07-24 by Rik Faith (faith@cs.unc.edu)
28 .\" Modified 2001-04-01 by aeb
29 .\" Modified 2003-07-23 by aeb
30 .\"
31 .\" Japanese Version Copyright (c) 1997 YOSHINO Takashi
32 .\"       all rights reserved.
33 .\" Translated Mon Jan 20 18:47:50 JST 1997
34 .\"       by YOSHINO Takashi <yoshino@civil.jcn.nihon-u.ac.jp>
35 .\" Updated Sat May 19 JST 2001 by Kentaro Shirakata <argrath@ub32.org>
36 .\" Updated Mon Sep  1 JST 2003 by Kentaro Shirakata <argrath@ub32.org>
37 .\" Updated 2007-05-04, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v2.44
38 .\"
39 .TH USLEEP 3  2010-09-20 "" "Linux Programmer's Manual"
40 .SH Ì¾Á°
41 usleep \- ¥Þ¥¤¥¯¥íÉÃñ°Ì¤Ç¼Â¹Ô¤ò±ä´ü¤¹¤ë
42 .SH ½ñ¼°
43 .nf
44 .B "#include <unistd.h>"
45 .sp
46 .BI "int usleep(useconds_t " usec );
47 .fi
48 .sp
49 .in -4n
50 glibc ¸þ¤±¤Îµ¡Ç½¸¡ºº¥Þ¥¯¥í¤ÎÍ×·ï
51 .RB ( feature_test_macros (7)
52 »²¾È):
53 .in
54 .sp
55 .BR usleep ():
56 .ad l
57 .RS 4
58 .PD 0
59 .TP 4
60 glibc 2.12 °Ê¹ß:
61 .nf
62 _BSD_SOURCE ||
63     (_XOPEN_SOURCE\ >=\ 500 ||
64         _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED) &&
65     !(_POSIX_C_SOURCE\ >=\ 200809L || _XOPEN_SOURCE\ >=\ 700)
66 .TP 4
67 .fi
68 glibc 2.12 ¤è¤êÁ°:
69 _BSD_SOURCE || _XOPEN_SOURCE\ >=\ 500 ||
70 _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED
71 .PD
72 .RE
73 .ad b
74 .SH ÀâÌÀ
75 .BR usleep ()
76 ´Ø¿ô¤Ï
77 (¾¯¤Ê¤¯¤È¤â) \fIusec\fP¥Þ¥¤¥¯¥íÉäδ֡¢
78 ¸Æ¤Ó½Ð¤·¸µ¥×¥í¥»¥¹¤Î¼Â¹Ô¤ò±ä´ü¤¹¤ë¡£
79 ¥·¥¹¥Æ¥à¤ÎÆ°ºî¾õ¶·¤ä¸Æ¤Ó½Ð¤·¤Ë¤è¤ë»þ´Ö¤Î¾ÃÈñ¤ä¥·¥¹¥Æ¥à¥¿¥¤¥Þ¤ÎγÅ٤ˤè¤Ã¤Æ¡¢
80 Ää»ß»þ´Ö¤ÏÀßÄꤷ¤¿Ãͤè¤ê¤â¾¯¤·±ä¤Ð¤µ¤ì¤ë¤«¤â¤·¤ì¤Ê¤¤¡£
81 .SH ÊÖ¤êÃÍ
82 À®¸ù¤¹¤ë¤È 0¡¢¥¨¥é¡¼¤Î¾ì¹ç \-1 ¤òÊÖ¤¹¡£
83 .SH ¥¨¥é¡¼
84 .TP
85 .B EINTR
86 ¥·¥°¥Ê¥ë¤Ë¤è¤Ã¤ÆÃæÃǤµ¤ì¤¿¡£
87 .BR signal (7)
88 »²¾È¡£
89 .TP
90 .B EINVAL
91 \fIusec\fP ¤¬ 1000000 °Ê¾å¤À¤Ã¤¿¡£
92 (¤³¤ì¤ò¥¨¥é¡¼¤È¤ß¤Ê¤¹¥·¥¹¥Æ¥à¤Î¤ß)
93 .SH ½àµò
94 4.3BSD, POSIX.1-2001.
95 POSIX.1-2001 ¤Ç¤Ï¡¢¤³¤Î´Ø¿ô¤Ï²áµî¤Î¤â¤Î¤ÈÀë¸À¤µ¤ì¤Æ¤¤¤ë¡£
96 Âå¤ï¤ê¤Ë
97 .BR nanosleep (2)
98 ¤ò»È¤¦¤³¤È¡£
99 POSIX.1-2008 ¤Ç¤Ï¡¢
100 .BR usleep ()
101 ¤Îµ¬Ä꤬ºï½ü¤µ¤ì¤Æ¤¤¤ë¡£
102
103 ¤â¤È¤â¤È¤Î BSD ¤Î¼ÂÁõ¤ä¡¢¥Ð¡¼¥¸¥ç¥ó 2.2.2 ¤è¤êÁ°¤Î glibc ¤Ç¤Ï¡¢
104 ¤³¤Î´Ø¿ô¤ÎÊÖ¤êÃͤη¿¤Ï
105 .I void
106 ¤Ç¤¢¤ë¡£
107 POSIX ÈǤÏ
108 .I int
109 ¤òÊÖ¤·¡¢¤³¤Î¥×¥í¥È¥¿¥¤¥×¤Ï glibc 2.2.2 °Ê¹ß¤Ç»ÈÍѤµ¤ì¤Æ¤¤¤ë¡£
110
111 ¥¨¥é¡¼¤È¤·¤Æ
112 .B EINVAL
113 ¤òÊÖ¤¹¤È¤¤¤¦¤Î¤Ï
114 SUSv2 ¤È POSIX.1-2001 ¤Ç¤Î¤ßʸ½ñ²½¤µ¤ì¤Æ¤¤¤ë¡£
115 .SH Ãí°Õ
116 .I useconds_t
117 ·¿¤Ï [0,1000000] ¤ÎÈϰϤÎÀ°¿ô¤ò°·¤¦¤³¤È¤¬¤Ç¤­¤ë
118 Éä¹æ¤Ê¤·À°¿ô·¿¤Ç¤¢¤ë¡£
119 ÌÀ¼¨Åª¤Ë¤³¤Î·¿¤ò»È¤ï¤Ê¤¤¤³¤È¤Ç¥×¥í¥°¥é¥à¤Î°Ü¿¢À­¤¬¤è¤ê¹â¤Þ¤ë¡£
120 °Ê²¼¤Î¤è¤¦¤Ë»È¤¦¤³¤È¡£
121 .in +4n
122 .nf
123 .sp
124 #include <unistd.h>
125 \&...
126     unsigned int usecs;
127 \&...
128     usleep(usecs);
129 .fi
130 .in
131 .LP
132 ¤³¤Î´Ø¿ô¤È¡¢
133 .B SIGALRM
134 ¥·¥°¥Ê¥ë¤¢¤ë¤¤¤Ï
135 .BR alarm (2),
136 .BR sleep (3),
137 .BR nanosleep (2),
138 .BR setitimer (2),
139 .BR timer_create (2),
140 .BR timer_delete (2),
141 .BR timer_getoverrun (2),
142 .BR timer_gettime (2),
143 .BR timer_settime (2),
144 .BR ualarm (3)
145 ¤È¤¤¤Ã¤¿¤½¤Î¾¤Î¥¿¥¤¥Þ¡¼´Ø¿ô¤òƱ»þ¤Ë»È¤Ã¤¿¾ì¹ç¤ÎÆ°ºî¤Ï̤ÄêµÁ¤Ç¤¢¤ë¡£
146 .SH ´ØÏ¢¹àÌÜ
147 .BR alarm (2),
148 .BR getitimer (2),
149 .BR nanosleep (2),
150 .BR select (2),
151 .BR setitimer (2),
152 .BR sleep (3),
153 .BR ualarm (3),
154 .BR time (7)