OSDN Git Service

9e2b0f497a7055c4629c813c925943480a25ecc8
[linuxjm/LDP_man-pages.git] / draft / man2 / getitimer.2
1 .\" Copyright 7/93 by Darren Senn <sinster@scintilla.santa-clara.ca.us>
2 .\" Based on a similar page Copyright 1992 by Rick Faith
3 .\" May be freely distributed
4 .\" Modified Tue Oct 22 00:22:35 EDT 1996 by Eric S. Raymond <esr@thyrsus.com>
5 .\" 2005-04-06 mtk, Matthias Lang <matthias@corelatus.se>
6 .\"     Noted MAX_SEC_IN_JIFFIES ceiling
7 .\"
8 .\" Japanese Version Copyright (c) 1997 HANATAKA Shinya
9 .\"         all rights reserved.
10 .\" Translated 1997-02-22, HANATAKA Shinya <hanataka@abyss.rim.or.jp>
11 .\" Updated 2005-04-23, Kentaro Shirakata <argrath@ub32.org>
12 .\" Updated 2005-09-11, Kentaro Shirakata <argrath@ub32.org>
13 .\" Updated 2006-07-23, Kentaro Shirakata <argrath@ub32.org>
14 .\" Updated 2007-10-14, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
15 .\" Updated 2009-04-13, Akihiro MOTOKI, LDP v3.20
16 .\"
17 .\" WORD:       timer   ¥¿¥¤¥Þ¡¼
18 .\" WORD:       jiffies jiffy
19 .\"
20 .TH GETITIMER 2 2009-03-15 "Linux" "Linux Programmer's Manual"
21 .SH Ì¾Á°
22 getitimer, setitimer \- ¥¤¥ó¥¿¡¼¥Ð¥ë¡¦¥¿¥¤¥Þ¡¼¤ÎÃͤò¼èÆÀ¤Þ¤¿¤ÏÀßÄꤹ¤ë
23 .SH ½ñ¼°
24 .nf
25 .B #include <sys/time.h>
26 .sp
27 .BI "int getitimer(int " which ", struct itimerval *" curr_value );
28 .br
29 .BI "int setitimer(int " which ", const struct itimerval *" new_value ,
30 .BI "              struct itimerval *" old_value );
31 .fi
32 .SH ÀâÌÀ
33 .\"O The system provides each process with three interval timers, each decrementing
34 .\"O in a distinct time domain.
35 .\"O When any timer expires, a signal is sent to the
36 .\"O process, and the timer (potentially) restarts.
37 ¥·¥¹¥Æ¥à¤Ï 1 ¸Ä¤Î¥×¥í¥»¥¹¤Ë¤Ä¤­ 3 ¸Ä¤Î¥¤¥ó¥¿¡¼¥Ð¥ë¡¦¥¿¥¤¥Þ¡¼¤òÄ󶡤¹¤ë¡£
38 ¤½¤ì¤¾¤ì¤Î¥¿¥¤¥Þ¡¼¤ÏÊÌ¡¹¤Î»þ´ÖÎΰè¤Ç¸º¾¯¤¹¤ë¡£
39 ¤É¤Î¥¿¥¤¥Þ¡¼¤âËþλ¤¹¤ë¤È¥×¥í¥»¥¹¤Ë¥·¥°¥Ê¥ë¤¬Á÷¤é¤ì¡¢
40 ¥¿¥¤¥Þ¡¼¤Ï (ÀßÄê¤Ë¤è¤Ã¤Æ¤Ï) ºÆ¤Ó³«»Ï¤µ¤ì¤ë¡£
41 .TP 1.5i
42 .\"O .B ITIMER_REAL
43 .\"O decrements in real time, and delivers
44 .\"O .B SIGALRM
45 .\"O upon expiration.
46 .B ITIMER_REAL
47 ¼Â»þ´Ö (real time) ¤Ç¸º¾¯¤·¡¢Ëþλ¤¹¤ë¤È
48 .B SIGALRM
49 ¤¬Á÷¤é¤ì¤ë¡£
50 .TP
51 .\"O .B ITIMER_VIRTUAL
52 .\"O decrements only when the process is executing, and delivers
53 .\"O .B SIGVTALRM
54 .\"O upon expiration.
55 .B ITIMER_VIRTUAL
56 ¥×¥í¥»¥¹¤¬¼Â¹Ô¤µ¤ì¤Æ¤¤¤ë´Ö¤Î¤ß¸º¾¯¤·¡¢Ëþλ¤¹¤ë¤È
57 .B SIGVTALRM
58 ¤¬Á÷¤é¤ì¤ë¡£
59 .TP
60 .\"O .B ITIMER_PROF
61 .\"O decrements both when the process executes and when the system is executing
62 .\"O on behalf of the process.
63 .\"O Coupled with
64 .\"O .BR ITIMER_VIRTUAL ,
65 .\"O this timer is usually used to profile the time spent by the
66 .\"O application in user and kernel space.
67 .\"O .B SIGPROF
68 .\"O is delivered upon expiration.
69 .B ITIMER_PROF
70 ¥×¥í¥»¥¹¤¬¼Â¹Ô¤µ¤ì¤Æ¤¤¤Æ¡¢
71 ¤«¤Ä¥·¥¹¥Æ¥à¤¬¤½¤Î¥×¥í¥»¥¹¤Î¤¿¤á¤Ë½èÍý¤ò¹Ô¤Ê¤Ã¤Æ¤¤¤ë´Ö¤Ë¸º¾¯¤¹¤ë¡£
72 ¿¤¯¤Î¾ì¹ç¡¢¤³¤Î¥¿¥¤¥Þ¡¼¤Ï
73 .B ITIMER_VIRTUAL
74 ¤ÈÁȤ߹ç¤ï¤µ¤ì¤Æ¡¢¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤¬¥«¡¼¥Í¥ë¶õ´Ö¤È¥æ¡¼¥¶¡¼¶õ´Ö¤Ç
75 ¤É¤ì¤À¤±¤Î»þ´Ö¤ò²á¤´¤·¤¿¤«¤ò¥×¥í¥Õ¥¡¥¤¥ë¤¹¤ë¤Î¤Ë»ÈÍѤµ¤ì¤ë¡£
76 Ëþλ¤¹¤ë¤È
77 .B SIGPROF
78 ¤¬Á÷¤é¤ì¤ë¡£
79 .LP
80 .\"O Timer values are defined by the following structures:
81 ¥¿¥¤¥Þ¡¼¤ÎÃͤϰʲ¼¤Î¹½Â¤ÂΤˤè¤Ã¤ÆÄêµÁ¤µ¤ì¤ë:
82 .PD 0
83 .in +4n
84 .nf
85
86 struct itimerval {
87     struct timeval it_interval; /* next value */
88     struct timeval it_value;    /* current value */
89 };
90
91 struct timeval {
92     long tv_sec;                /* seconds */
93     long tv_usec;               /* microseconds */
94 };
95 .fi
96 .in
97 .PD
98 .LP
99 .\"O The function
100 .\"O .BR getitimer ()
101 .\"O fills the structure pointed to by
102 .\"O .I curr_value
103 .\"O with the current setting for the timer specified by
104 .\"O .I which
105 .\"O (one of
106 .\"O .BR ITIMER_REAL ,
107 .\"O .BR ITIMER_VIRTUAL ,
108 .\"O or
109 .\"O .BR ITIMER_PROF ).
110 .BR getitimer ()
111 ´Ø¿ô¤Ï¡¢
112 .I which
113 ¤Ç»ØÄꤵ¤ì¤¿¥¿¥¤¥Þ¡¼
114 .RB ( ITIMER_REAL ,
115 .BR ITIMER_VIRTUAL ,
116 .B ITIMER_PROF
117 ¤Î¤É¤ì¤«) ¤Î¸½ºß¤ÎÀßÄê¤ò¡¢
118 .I curr_value
119 ¤Ç»ØÄꤵ¤ì¤¿¹½Â¤ÂΤ˳ÊǼ¤¹¤ë¡£
120 .\"O The element
121 .\"O .I it_value
122 .\"O is set to the amount of time remaining on the timer, or zero if the timer
123 .\"O is disabled.
124 .\"O Similarly,
125 .\"O .I it_interval
126 .\"O is set to the reset value.
127 .I it_value
128 Í×ÁǤˤϥ¿¥¤¥Þ¡¼¤Î»Ä¤ê»þ´Ö¤¬ÀßÄꤵ¤ì¤ë¡£¥¿¥¤¥Þ¡¼¤¬¥ª¥Õ¤Î¾ì¹ç¤Ï
129 ¥¼¥í¤¬ÀßÄꤵ¤ì¤ë¡£Æ±ÍͤË
130 .I it_interval
131 ¤Ë¤Ï½é´üÃͤ¬ÀßÄꤵ¤ì¤ë¡£
132
133 .\"O The function
134 .\"O .BR setitimer ()
135 .\"O sets the specified timer to the value in
136 .\"O .IR new_value .
137 .BR setitimer ()
138 ´Ø¿ô¤Ï»ØÄꤵ¤ì¤¿¥¿¥¤¥Þ¡¼¤Ë
139 .I new_value
140 ¤ÎÃͤòÀßÄꤹ¤ë¡£
141 .\"O If
142 .\"O .I old_value
143 .\"O is non-NULL, the old value of the timer is stored there.
144 .I old_value
145 ¤¬ NULL °Ê³°¤Î¾ì¹ç¡¢¥¿¥¤¥Þ¡¼¤Î¸Å¤¤Ãͤ¬
146 .I old_value
147 ¤Ë³ÊǼ¤µ¤ì¤ë¡£
148 .LP
149 .\"O Timers decrement from
150 .\"O .I it_value
151 .\"O to zero, generate a signal, and reset to
152 .\"O .IR it_interval .
153 ¥¿¥¤¥Þ¡¼¤Ï
154 .I it_value
155 ¤«¤é¥¼¥í¤Ø¸þ¤±¤Æ¸º¤Ã¤Æ¤¤¤­¡¢¥·¥°¥Ê¥ë¤òÀ¸À®¤·¡¢
156 .I it_interval
157 ¤Ë½é´ü²½¤µ¤ì¤ë¡£
158 .\"O A timer which is set to zero
159 .\"O .RI ( it_value
160 .\"O is zero or the timer expires and
161 .\"O .I it_interval
162 .\"O is zero) stops.
163 ¥¿¥¤¥Þ¡¼¤¬¥¼¥í¤ËÀßÄꤵ¤ì¤¿¾ì¹ç
164 .RI ( it_value
165 ¤¬¥¼¥í¤«¡¢¥¿¥¤¥Þ¡¼¤¬Ëþλ¤·¤¿»þ¤Ë
166 .I it_interval
167 ¤¬¥¼¥í¤Î¾ì¹ç) ¤ÏÄä»ß¤¹¤ë¡£
168 .LP
169 .\"O Both
170 .\"O .I tv_sec
171 .\"O and
172 .\"O .I tv_usec
173 .\"O are significant in determining the duration of a timer.
174 ¥¿¥¤¥Þ¡¼¤Î´ü´Ö¤Ï
175 .I tv_sec
176 ¤È
177 .I tv_usec
178 ¤ÎξÊý¤Ë¤è¤ê·èÄꤵ¤ì¤ë¡£
179 .LP
180 .\"O Timers will never expire before the requested time,
181 .\"O but may expire some (short) time afterwards, which depends
182 .\"O on the system timer resolution and on the system load; see
183 .\"O .BR time (7).
184 .\"O (But see BUGS below.)
185 .\"O Upon expiration, a signal will be generated and the timer reset.
186 .\"O If the timer expires while the process is active (always true for
187 .\"O .BR ITIMER_VIRTUAL )
188 .\"O the signal will be delivered immediately when generated.
189 .\"O Otherwise the
190 .\"O delivery will be offset by a small time dependent on the system loading.
191 Í׵ᤷ¤¿»þ´Ö¤¬¤¯¤ëÁ°¤Ë¥¿¥¤¥Þ¡¼¤¬Ëþλ¤¹¤ë¤³¤È¤Ï¤Ê¤¤¤¬¡¢
192 µÕ¤Ë¤¢¤ë (û¤¤) »þ´Ö¤À¤±Ëþ뤬ÃÙ¤ì¤ë¤³¤È¤Ï¤¢¤ë¡£
193 ¤É¤ì¤À¤±ÃÙ¤ì¤ë¤«¤Ï¥·¥¹¥Æ¥à¤Î»þ´Öʬ²òǽ¤È¥·¥¹¥Æ¥à¤ÎÉé²Ù¤Ë°Í¸¤¹¤ë
194 .RB ( time (7)
195 »²¾È; Ã¢¤·¡¢¥Ð¥°¤Î¹à¤â»²¾È¤Î¤³¤È)¡£
196 ¥¿¥¤¥Þ¡¼¤¬Ëþλ¤¹¤ë¤È¥·¥°¥Ê¥ë¤¬À¸À®¤µ¤ì¡¢¥¿¥¤¥Þ¡¼¤Ï½é´ü²½¤µ¤ì¤ë¡£
197 ¥×¥í¥»¥¹¤¬¥¢¥¯¥Æ¥£¥Ö¤Ê»þ
198 .RB ( ITIMER_VIRTUAL
199 ¤Î¾ì¹ç¤Ë¤Ï¾ï¤Ë¤½¤¦¤Ç¤¢¤ë) ¤Ë¥¿¥¤¥Þ¡¼¤¬Ëþλ¤·¤¿¾ì¹ç¡¢À¸À®¤µ¤ì¤¿¥·¥°¥Ê¥ë¤Ï
200 ¤¹¤°¤ËÇÛÁ÷¤µ¤ì¤ë¡£¤½¤ì°Ê³°¤Î¾ì¹ç¤Ï¡¢¥·¥¹¥Æ¥à¤ÎÉé²Ù¤Ë¤è¤ê¾¯¤·¤Î»þ´Ö¤À¤±
201 ÃÙ¤ì¤ÆÇÛÁ÷¤µ¤ì¤ë¡£
202 .SH ÊÖ¤êÃÍ
203 .\"O On success, zero is returned.
204 .\"O On error, \-1 is returned, and
205 .\"O .I errno
206 .\"O is set appropriately.
207 À®¸ù¤·¤¿¾ì¹ç¤Ï¥¼¥í¤¬Ê֤롣¥¨¥é¡¼¤Î¾ì¹ç¤Ï \-1 ¤¬Ê֤ꡢ
208 .I errno
209 ¤¬Å¬ÀÚ¤ËÀßÄꤵ¤ì¤ë¡£
210 .SH ¥¨¥é¡¼
211 .TP
212 .B EFAULT
213 .\"O .IR new_value ,
214 .\"O .IR old_value ,
215 .\"O or
216 .\"O .I curr_value
217 .\"O is not valid a pointer.
218 .IR new_value ,
219 .IR old_value ,
220 .I curr_value
221 ¤¬Í­¸ú¤Ê¥Ý¥¤¥ó¥¿¡¼¤Ç¤Ê¤¤¡£
222 .TP
223 .B EINVAL
224 .\"O .I which
225 .\"O is not one of
226 .\"O .BR ITIMER_REAL ,
227 .\"O .BR ITIMER_VIRTUAL ,
228 .\"O or
229 .\"O .BR ITIMER_PROF ;
230 .\"O or (since Linux 2.6.22) one of the
231 .\"O .I tv_usec
232 .\"O fields in the structure pointed to by
233 .\"O .I new_value
234 .\"O contains a value outside the range 0 to 999999.
235 .I which
236 ¤¬
237 .BR ITIMER_REAL ,
238 .BR ITIMER_VIRTUAL ,
239 .B ITIMER_PROF
240 ¤Î¤É¤ì¤Ç¤â¤Ê¤¤¡£
241 ¤Þ¤¿¤Ï (Linux 2.6.22 °Ê¹ß¤Ç)
242 .I new_value
243 ¤Ç»ØÄꤵ¤ì¤¿¹½Â¤ÂΤÎ
244 .I tv_usec
245 ¥Õ¥£¡¼¥ë¥É¤Î°ì¤Ä¤¬ 0 °Ê¾å 999999 °Ê²¼¤ÎÈϰϤËÆþ¤é¤Ê¤¤ÃͤǤ¢¤ë¡£
246 .\"O .SH "CONFORMING TO"
247 .SH ½àµò
248 .\"O POSIX.1-2001, SVr4, 4.4BSD (this call first appeared in 4.2BSD).
249 POSIX.1-2001, SVr4, 4.4BSD (¤³¤Î¥³¡¼¥ë¤Ï 4.2BSD ¤Ç»Ï¤á¤Æ¸½¤ï¤ì¤¿).
250 .\"O POSIX.1-2008 marks
251 .\"O .BR getitimer ()
252 .\"O and
253 .\"O .BR setitimer ()
254 .\"O obsolete, recommending the use of the POSIX timers API
255 .\"O .RB ( timer_gettime (2),
256 .\"O .BR timer_settime (2),
257 .\"O etc.) instead.
258 POSIX.1-2008 ¤Ç¤Ï¡¢
259 .BR getitimer ()
260 ¤È
261 .BR setitimer ()
262 ¤ÏÇÑ»ßͽÄê¤È¤µ¤ì¤Æ¤ª¤ê¡¢
263 Âå¤ï¤ê¤Ë POSIX ¥¿¥¤¥Þ¡¼ API
264 .RB ( timer_gettime (2),
265 .BR timer_settime (2)
266 ¤Ê¤É) ¤ò»È¤¦¤³¤È¤¬¿ä¾©¤µ¤ì¤Æ¤¤¤ë¡£
267 .\"O .SH NOTES
268 .SH Ãí°Õ
269 .\"O A child created via
270 .\"O .BR fork (2)
271 .\"O does not inherit its parent's interval timers.
272 .\"O Interval timers are preserved across an
273 .\"O .BR execve (2).
274 .BR fork (2)
275 ¤ÇºîÀ®¤µ¤ì¤¿»Ò¥×¥í¥»¥¹¤Ï¡¢
276 ¿Æ¥×¥í¥»¥¹¤Î¥¤¥ó¥¿¡¼¥Ð¥ë¡¦¥¿¥¤¥Þ¡¼¤ò·Ñ¾µ¤·¤Ê¤¤¡£
277 .BR execve (2)
278 ¤ÎÁ°¸å¤Ç¤Ï¥¤¥ó¥¿¡¼¥Ð¥ë¡¦¥¿¥¤¥Þ¡¼¤ÏÊݸ¤µ¤ì¤ë¡£
279
280 .\"O POSIX.1 leaves the
281 .\"O interaction between
282 .\"O .BR setitimer()
283 .\"O and the three interfaces
284 .\"O .BR alarm (2),
285 .\"O .BR sleep (3),
286 .\"O and
287 .\"O .BR usleep (3)
288 .\"O unspecified.
289 POSIX.1 ¤Ç¤Ï¡¢
290 .BR setitimer ()
291 ¤È¡¢
292 .BR alarm (2),
293 .BR sleep (3),
294 .BR usleep (3)
295 ¤È¤¤¤¦ 3 ¤Ä¤Î¥¤¥ó¥¿¥Õ¥§¡¼¥¹¤È¤ÎÁê¸ß¤Î±Æ¶Á¤Ë¤Ä¤¤¤Æ¤Ïµ¬Äꤷ¤Æ¤¤¤Ê¤¤¡£
296 .\"O .SH BUGS
297 .SH ¥Ð¥°
298 .\"O The generation and delivery of a signal are distinct, and
299 .\"O only one instance of each of the signals listed above may be pending
300 .\"O for a process.
301 .\"O Under very heavy loading, an
302 .\"O .B ITIMER_REAL
303 .\"O timer may expire before the signal from a previous expiration
304 .\"O has been delivered.
305 .\"O The second signal in such an event will be lost.
306 ¥·¥°¥Ê¥ë¤ÎÀ¸À®¤ÈÇÛÁ÷¤ÏÊ̸ĤΤâ¤Î¤Ç¤¢¤ê¡¢
307 Á°½Ò¤Î¥·¥°¥Ê¥ë¤Î¤½¤ì¤¾¤ì¤Ë¤Ä¤¤¤Æ°ì¤Ä¤À¤±¤¬¥×¥í¥»¥¹¤Î¤¿¤á¤Ë
308 ÂÔµ¡¤¹¤ë¡£
309 Èó¾ï¤Ë½Å¤¤Éé²Ù¤Î²¼¤Ç¤Ï¡¢
310 .B ITIMER_REAL
311 ¥¿¥¤¥Þ¡¼¤Ç¤Ï¡¢»þ´ÖÀÚ¤ì¤Ë¤è¤êÀ¸À®¤µ¤ì¤¿°ì¤ÄÁ°¤Î¥·¥°¥Ê¥ë¤¬ÇÛÁ÷¤µ¤ì¤ëÁ°¤Ë¡¢
312 ¼¡¤Î»þ´ÖÀڤ줬µ¯¤³¤ë¾ì¹ç¤¬¤¢¤ë¡£
313 ¤½¤Î¤è¤¦¤Ê¾ì¹ç¡¢ 2 ¸Ä¤á¤Î¥¤¥Ù¥ó¥È¤ËÂФ¹¤ë¥·¥°¥Ê¥ë¤Ï¼º¤ï¤ì¤Æ¤·¤Þ¤¦¡£
314
315 .\"O On Linux kernels before 2.6.16, timer values are represented in jiffies.
316 ¥Ð¡¼¥¸¥ç¥ó 2.6.16 ¤è¤êÁ°¤Î Linux ¥«¡¼¥Í¥ë¤Ç¤Ï¡¢
317 ¥¿¥¤¥Þ¡¼¤ÎÃͤϠjiffy ¤Çɽ¸½¤µ¤ì¤ë¡£
318 .\"O If a request is made set a timer with a value whose jiffies
319 .\"O representation exceeds
320 .\"O .B MAX_SEC_IN_JIFFIES
321 .\"O (defined in
322 .\"O .IR include/linux/jiffies.h ),
323 .\"O then the timer is silently truncated to this ceiling value.
324 .\"O On Linux/i386 (where, since Linux 2.6.13,
325 .\"O the default jiffy is 0.004 seconds),
326 .\"O this means that the ceiling value for a timer is
327 .\"O approximately 99.42 days.
328 Í׵᤬ jiffy É½¸½¤Ç
329 .RI ( include/linux/jiffies.h
330 ¤ÇÄêµÁ¤µ¤ì¤Æ¤¤¤ë)
331 .B MAX_SEC_IN_JIFFIES
332 ¤ò±Û¤¨¤ëÃͤò¥¿¥¤¥Þ¡¼¤ËÀßÄꤷ¤è¤¦¤È¤¹¤ë¤â¤Î¤Î¾ì¹ç¡¢
333 ¥¿¥¤¥Þ¡¼¤Ï°ÅÌۤˤ³¤Î¾å¸ÂÃͤËÀÚ¤êµÍ¤á¤é¤ì¤ë¡£
334 Linux/i386 ¤Î¾ì¹ç (Linux 2.6.13 °Ê¹ß¤Ç¤Ï jiffy ¤Ï 0.004 ÉÃ) ¤Î¾ì¹ç¡¢
335 ¤³¤ì¤Ï¥¿¥¤¥Þ¡¼¤Î¾å¸ÂÃͤ¬¤ª¤è¤½ 99.42 Æü¤Ë¤Ê¤ë¤³¤È¤ò°ÕÌ£¤¹¤ë¡£
336 .\"O Since Linux 2.6.16,
337 .\"O the kernel uses a different internal representation for times,
338 .\"O and this ceiling is removed.
339 Linux 2.6.16 °Ê¹ß¤Ç¤Ï¡¢¥«¡¼¥Í¥ë¤Ï»þ´Ö¤Ë´Ø¤¹¤ëÆâÉôɽ¸½¤È¤·¤Æ
340 °Û¤Ê¤ëɽ¸½¤ò»È¤¦¤è¤¦¤Ë¤Ê¤Ã¤Æ¤ª¤ê¡¢¤³¤Î¾å¸Â¤Ï¤Ê¤¯¤Ê¤Ã¤¿¡£
341
342 .\"O On certain systems (including i386),
343 .\"O Linux kernels before version 2.6.12 have a bug which will produce
344 .\"O premature timer expirations of up to one jiffy under some circumstances.
345 .\"O This bug is fixed in kernel 2.6.12.
346 (i386 ¤ò´Þ¤à) ¤¤¤¯¤Ä¤«¤Î¥·¥¹¥Æ¥à¤Ç¤Ï¡¢
347 ¥Ð¡¼¥¸¥ç¥ó 2.6.12 °ÊÁ°¤Î Linux ¥«¡¼¥Í¥ë¤Ï
348 ¤¢¤ë¼ï¤Î¾õ¶·¤Ç¤Ï 1 jiffy Á᤯¥¿¥¤¥Þ¡¼¤¬½ªÎ»¤·¤Æ¤·¤Þ¤¦¤È¤¤¤¦¥Ð¥°¤¬¤¢¤Ã¤¿¡£
349 ¤³¤Î¥Ð¥°¤Ï¥«¡¼¥Í¥ë 2.6.12 ¤Ç½¤Àµ¤µ¤ì¤¿¡£
350 .\" 4 Jul 2005: It looks like this bug may remain in 2.4.x.
351 .\"     http://lkml.org/lkml/2005/7/1/165
352
353 .\"O POSIX.1-2001 says that
354 .\"O .BR setitimer ()
355 .\"O should fail if a
356 .\"O .I tv_usec
357 .\"O value is specified that is outside of the range 0 to 999999.
358 .\"O However, in kernels up to and including 2.6.21,
359 .\"O Linux does not give an error, but instead silently
360 .\"O adjusts the corresponding seconds value for the timer.
361 POSIX.1-2001 ¤Ç¤Ï
362 .BR setitimer ()
363 ¤Ï
364 .I tv_usec
365 ¤ÎÃͤ¬ 0 ¤«¤é 999999 ¤ÎÈϰϳ°¤Ç¤¢¤ë¾ì¹ç¤Ë¤Ï¼ºÇÔ¤¹¤ë¤Ù¤­¤À¤È¤·¤Æ¤¤¤ë¡£
366 ¤·¤«¤·¡¢2.6.21 °ÊÁ°¤Î¥«¡¼¥Í¥ë¤Î Linux ¤Ç¤Ï¥¨¥é¡¼¤Ë¤Ê¤é¤º¡¢
367 Âбþ¤¹¤ëÉÿô¤Îʬ¤À¤±¤½¤Î¥¿¥¤¥Þ¡¼¤ÎÉäÎÃͤ¬°ÅÌÛ¤ËÄ´À°¤µ¤ì¤ë¡£
368 .\"O From kernel 2.6.22 onwards,
369 .\"O this nonconformance has been repaired:
370 .\"O an improper
371 .\"O .I tv_usec
372 .\"O value results in an
373 .\"O .B EINVAL
374 .\"O error.
375 ¥«¡¼¥Í¥ë 2.6.22 °Ê¹ß¤Ç¤Ï¡¢¤³¤Îɸ½àÈó½àµò¤ÎÆ°ºî¤Ï½¤Àµ¤µ¤ì¡¢
376 .I tv_usec
377 ¤ÎÃͤ¬ÉÔŬÀڤʾì¹ç¤Ë¤Ï
378 .B EINVAL
379 ¥¨¥é¡¼¤È¤Ê¤ë¡£
380 .\" Bugzilla report 25 Apr 2006:
381 .\" http://bugzilla.kernel.org/show_bug.cgi?id=6443
382 .\" "setitimer() should reject noncanonical arguments"
383 .\"O .SH "SEE ALSO"
384 .SH ´ØÏ¢¹àÌÜ
385 .BR gettimeofday (2),
386 .BR sigaction (2),
387 .BR signal (2),
388 .BR timer_create (2),
389 .BR timerfd_create (2),
390 .BR time (7)