Debian Codegraph @

po/fr/man2/timerfd_create.2.po

raw
1 # French translation of manpages
2 # This file is distributed under the same license as the manpages-l10n package.
3 # Copyright © of this file:
4 # Christophe Blaess <https://www.blaess.fr/christophe/>, 1996-2003.
5 # Stéphan Rafin <[email protected]>, 2002.
6 # Thierry Vignaud <[email protected]>, 1999, 2002.
7 # François Micaux, 2002.
8 # Alain Portal <[email protected]>, 2003-2008.
9 # Jean-Philippe Guérard <[email protected]>, 2005-2006.
10 # Jean-Luc Coulon (f5ibh) <[email protected]>, 2006-2007.
11 # Julien Cristau <[email protected]>, 2006-2007.
12 # Thomas Huriaux <[email protected]>, 2006-2008.
13 # Nicolas François <[email protected]>, 2006-2008.
14 # Florentin Duneau <[email protected]>, 2006-2010.
15 # Simon Paillard <[email protected]>, 2006.
16 # Denis Barbier <[email protected]>, 2006, 2010.
17 # David Prévot <[email protected]>, 2010, 2012, 2013.
18 # Cédric Boutillier <[email protected]>, 2011, 2012, 2013.
19 # Frédéric Hantrais <[email protected]>, 2013, 2014.
20 # Jean-Pierre Giraud <[email protected]>, 2023-2024.
21 msgid ""
22 msgstr ""
23 "Project-Id-Version: manpages-l10n 4.23.0\n"
24 "POT-Creation-Date: 2026-06-05 06:49+0200\n"
25 "PO-Revision-Date: 2026-06-27 18:18+0200\n"
26 "Last-Translator: Jean-Pierre Giraud <[email protected]>\n"
27 "Language-Team: French <[email protected]>\n"
28 "Language: fr\n"
29 "MIME-Version: 1.0\n"
30 "Content-Type: text/plain; charset=UTF-8\n"
31 "Content-Transfer-Encoding: 8bit\n"
32 "Plural-Forms: nplurals=2; plural=n > 1;\n"
33 "X-Generator: Lokalize 25.04.0\n"
34
35 #. type: TH
36 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
37 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
38 #, no-wrap
39 msgid "timerfd_create"
40 msgstr "timerfd_create"
41
42 #. type: TH
43 #: archlinux debian-unstable opensuse-leap-16-1 opensuse-tumbleweed
44 #, no-wrap
45 msgid "2026-02-16"
46 msgstr "16 février 2026"
47
48 #. type: TH
49 #: archlinux debian-unstable
50 #, no-wrap
51 msgid "Linux man-pages 6.18"
52 msgstr "Pages du manuel de Linux 6.18"
53
54 #. type: SH
55 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
56 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
57 #, no-wrap
58 msgid "NAME"
59 msgstr "NOM"
60
61 #. type: Plain text
62 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
63 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
64 msgid ""
65 "timerfd_create, timerfd_settime, timerfd_gettime - timers that notify via "
66 "file descriptors"
67 msgstr ""
68 "timerfd_create, timerfd_settime, timerfd_gettime - Minuteries qui informent "
69 "par l'intermédiaire de descripteurs de fichier"
70
71 #. type: SH
72 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
73 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
74 #, no-wrap
75 msgid "LIBRARY"
76 msgstr "BIBLIOTHÈQUE"
77
78 #. type: Plain text
79 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
80 #: opensuse-leap-16-1 opensuse-tumbleweed
81 msgid "Standard C library (I<libc>,\\ I<-lc>)"
82 msgstr "Bibliothèque C standard (I<libc>,\\ I<-lc>)"
83
84 #. type: SH
85 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
86 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
87 #, no-wrap
88 msgid "SYNOPSIS"
89 msgstr "SYNOPSIS"
90
91 #. type: Plain text
92 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
93 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
94 #, no-wrap
95 msgid "B<#include E<lt>sys/timerfd.hE<gt>>\n"
96 msgstr "B<#include E<lt>sys/timerfd.hE<gt>>\n"
97
98 #. type: Plain text
99 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
100 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
101 #, no-wrap
102 msgid "B<int timerfd_create(int >I<clockid>B<, int >I<flags>B<);>\n"
103 msgstr "B<int timerfd_create(int >I<clockid>B<, int >I<flags>B<);>\n"
104
105 #. type: Plain text
106 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
107 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
108 #, no-wrap
109 msgid ""
110 "B<int timerfd_settime(int >I<fd>B<, int >I<flags>B<,>\n"
111 "B< const struct itimerspec *>I<new_value>B<,>\n"
112 "B< struct itimerspec *_Nullable >I<old_value>B<);>\n"
113 "B<int timerfd_gettime(int >I<fd>B<, struct itimerspec *>I<curr_value>B<);>\n"
114 msgstr ""
115 "B<int timerfd_settime(int >I<fd>B<, int >I<flags>B<,>\n"
116 "B< const struct itimerspec *>I<new_value>B<,>\n"
117 "B< struct itimerspec *_Nullable >I<old_value>B<);>\n"
118 "B<int timerfd_gettime(int >I<fd>B<, struct itimerspec *>I<curr_value>B<);>\n"
119
120 #. type: SH
121 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
122 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
123 #, no-wrap
124 msgid "DESCRIPTION"
125 msgstr "DESCRIPTION"
126
127 #. type: Plain text
128 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
129 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
130 msgid ""
131 "These system calls create and operate on a timer that delivers timer "
132 "expiration notifications via a file descriptor. They provide an alternative "
133 "to the use of B<setitimer>(2) or B<timer_create>(2), with the advantage "
134 "that the file descriptor may be monitored by B<select>(2), B<poll>(2), and "
135 "B<epoll>(7)."
136 msgstr ""
137 "Ces appels système créent et opèrent sur une minuterie qui fournit des "
138 "notifications d'expiration par un descripteur de fichier. Ils fournissent "
139 "une alternative à B<setitimer>(2) ou B<timer_create>(2) avec l'avantage que "
140 "le descripteur de fichier peut être surveillé avec B<select>(2), B<poll>(2) "
141 "ou B<epoll>(7)."
142
143 #. type: Plain text
144 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
145 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
146 msgid ""
147 "The use of these three system calls is analogous to the use of "
148 "B<timer_create>(2), B<timer_settime>(2), and B<timer_gettime>(2). (There is "
149 "no analog of B<timer_getoverrun>(2), since that functionality is provided by "
150 "B<read>(2), as described below.)"
151 msgstr ""
152 "L'utilisation de ces trois appels système est analogue à l'utilisation de "
153 "B<timer_create>(2), B<timer_settime>(2) et B<timer_gettime>(2). (Il n'y a "
154 "pas d'équivalent à B<timer_getoverrun>(2) puisque cette fonctionnalité est "
155 "fournie par B<read>(2), comme décrit ci-dessous)"
156
157 #. type: SS
158 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
159 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
160 #, no-wrap
161 msgid "timerfd_create()"
162 msgstr "timerfd_create()"
163
164 #. type: Plain text
165 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
166 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
167 msgid ""
168 "B<timerfd_create>() creates a new timer object, and returns a file "
169 "descriptor that refers to that timer. The I<clockid> argument specifies the "
170 "clock that is used to mark the progress of the timer, and must be one of the "
171 "following:"
172 msgstr ""
173 "B<timerfd_create>() crée un nouvel objet minuterie et renvoie un descripteur "
174 "de fichier qui se réfère à cette minuterie. Le paramètre I<clockid> indique "
175 "l'horloge utilisée pour marquer la progression de la minuterie qui doit être "
176 "une des suivantes :"
177
178 #. type: TP
179 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
180 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
181 #, no-wrap
182 msgid "B<CLOCK_REALTIME>"
183 msgstr "B<CLOCK_REALTIME>"
184
185 #. type: Plain text
186 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
187 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
188 msgid "A settable system-wide real-time clock."
189 msgstr "Une horloge temps réel configurable à l'échelle du système."
190
191 #. type: TP
192 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
193 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
194 #, no-wrap
195 msgid "B<CLOCK_MONOTONIC>"
196 msgstr "B<CLOCK_MONOTONIC>"
197
198 #. type: Plain text
199 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
200 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
201 msgid ""
202 "A nonsettable monotonically increasing clock that measures time from some "
203 "unspecified point in the past that does not change after system startup."
204 msgstr ""
205 "Une horloge non configurable, toujours croissante qui mesure le temps depuis "
206 "un instant non spécifié dans le passé et qui ne change pas après le "
207 "démarrage du système."
208
209 #. type: TP
210 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
211 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
212 #, no-wrap
213 msgid "B<CLOCK_BOOTTIME> (Since Linux 3.15)"
214 msgstr "B<CLOCK_BOOTTIME> (depuis Linux 3.15)"
215
216 #. commit 4a2378a943f09907fb1ae35c15de917f60289c14
217 #. type: Plain text
218 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
219 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
220 msgid ""
221 "Like B<CLOCK_MONOTONIC>, this is a monotonically increasing clock. However, "
222 "whereas the B<CLOCK_MONOTONIC> clock does not measure the time while a "
223 "system is suspended, the B<CLOCK_BOOTTIME> clock does include the time "
224 "during which the system is suspended. This is useful for applications that "
225 "need to be suspend-aware. B<CLOCK_REALTIME> is not suitable for such "
226 "applications, since that clock is affected by discontinuous changes to the "
227 "system clock."
228 msgstr ""
229 "C'est une horloge toujours croissante comme B<CLOCK_MONOTONIC>. Cependant "
230 "alors que l'horloge B<CLOCK_MONOTONIC> ne mesure pas le temps aussi "
231 "longtemps que le système est suspendu, l'horloge B<CLOCK_BOOTTIME> inclut le "
232 "temps pendant lequel le système est suspendu. Cela est utile pour les "
233 "applications qui doivent être sensibles au temps de suspension. "
234 "B<CLOCK_REALTIME> n'est pas adapté à ce type d'application dans la mesure où "
235 "cette horloge est affectée par des modifications discontinues de l'horloge "
236 "système."
237
238 #. type: TP
239 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
240 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
241 #, no-wrap
242 msgid "B<CLOCK_REALTIME_ALARM> (since Linux 3.11)"
243 msgstr "B<CLOCK_REALTIME_ALARM> (depuis Linux 3.11)"
244
245 #. commit 11ffa9d6065f344a9bd769a2452f26f2f671e5f8
246 #. type: Plain text
247 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
248 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
249 msgid ""
250 "This clock is like B<CLOCK_REALTIME>, but will wake the system if it is "
251 "suspended. The caller must have the B<CAP_WAKE_ALARM> capability in order "
252 "to set a timer against this clock."
253 msgstr ""
254 "Cette horloge se comporte comme B<CLOCK_REALTIME>, mais réveillera le "
255 "système s'il est suspendu. L'appelant doit avoir la capacité "
256 "B<CAP_WAKE_ALARM> afin de régler une minuterie utilisant cette horloge."
257
258 #. type: TP
259 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
260 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
261 #, no-wrap
262 msgid "B<CLOCK_BOOTTIME_ALARM> (since Linux 3.11)"
263 msgstr "B<CLOCK_BOOTTIME_ALARM> (depuis Linux 3.11)"
264
265 #. commit 11ffa9d6065f344a9bd769a2452f26f2f671e5f8
266 #. type: Plain text
267 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
268 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
269 msgid ""
270 "This clock is like B<CLOCK_BOOTTIME>, but will wake the system if it is "
271 "suspended. The caller must have the B<CAP_WAKE_ALARM> capability in order "
272 "to set a timer against this clock."
273 msgstr ""
274 "Cette horloge se comporte comme B<CLOCK_BOOTTIME>, mais réveillera le "
275 "système s'il est suspendu. L'appelant doit avoir la capacité "
276 "B<CAP_WAKE_ALARM> afin de régler une minuterie utilisant cette horloge."
277
278 #. type: Plain text
279 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
280 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
281 msgid "See B<clock_getres>(2) for some further details on the above clocks."
282 msgstr ""
283 "Consultez B<clock_getres>(2) pour quelques détails supplémentaires sur les "
284 "horloges mentionnées."
285
286 #. type: Plain text
287 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
288 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
289 msgid ""
290 "The current value of each of these clocks can be retrieved using "
291 "B<clock_gettime>(2)."
292 msgstr ""
293 "La valeur actuelle de chacune de ces horloges peut être obtenue avec "
294 "B<clock_gettime>(2)."
295
296 #. type: Plain text
297 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
298 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
299 msgid ""
300 "Starting with Linux 2.6.27, the following values may be bitwise ORed in "
301 "I<flags> to change the behavior of B<timerfd_create>():"
302 msgstr ""
303 "À partir de Linux 2.6.27, les valeurs suivantes peuvent être incluses avec "
304 "un OU binaire dans I<flags> pour changer le comportement de "
305 "B<timerfd_create>() :"
306
307 #. type: TP
308 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
309 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
310 #, no-wrap
311 msgid "B<TFD_NONBLOCK>"
312 msgstr "B<TFD_NONBLOCK>"
313
314 #. type: Plain text
315 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
316 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
317 msgid ""
318 "Set the B<O_NONBLOCK> file status flag on the open file description (see "
319 "B<open>(2)) referred to by the new file descriptor. Using this flag saves "
320 "extra calls to B<fcntl>(2) to achieve the same result."
321 msgstr ""
322 "Placer l'attribut d'état de fichier B<O_NONBLOCK> sur la description du "
323 "fichier ouvert référencée par le nouveau descripteur de fichier (consulter "
324 "B<open>(2)). Utiliser cet attribut économise des appels supplémentaires à "
325 "B<fcntl>(2) pour obtenir le même résultat."
326
327 #. type: TP
328 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
329 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
330 #, no-wrap
331 msgid "B<TFD_CLOEXEC>"
332 msgstr "B<TFD_CLOEXEC>"
333
334 #. type: Plain text
335 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
336 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
337 msgid ""
338 "Set the close-on-exec (B<FD_CLOEXEC>) flag on the new file descriptor. See "
339 "the description of the B<O_CLOEXEC> flag in B<open>(2) for reasons why this "
340 "may be useful."
341 msgstr ""
342 "Placer l'attribut « close-on-exec » (B<FD_CLOEXEC>) sur le nouveau "
343 "descripteur de fichier. Consultez la description de l'attribut B<O_CLOEXEC> "
344 "dans B<open>(2) pour savoir pourquoi cela peut être utile."
345
346 #. type: Plain text
347 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
348 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
349 msgid ""
350 "In Linux versions up to and including 2.6.26, I<flags> must be specified as "
351 "zero."
352 msgstr ""
353 "Dans les versions de Linux jusqu'à la version 2.6.26 incluse, I<flags> doit "
354 "être nul."
355
356 #. type: SS
357 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
358 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
359 #, no-wrap
360 msgid "timerfd_settime()"
361 msgstr "timerfd_settime()"
362
363 #. type: Plain text
364 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
365 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
366 msgid ""
367 "B<timerfd_settime>() arms (starts) or disarms (stops) the timer referred "
368 "to by the file descriptor I<fd>."
369 msgstr ""
370 "B<timerfd_settime>() arme (démarre) ou désarme (stoppe) la minuterie à "
371 "laquelle se réfère le descripteur de fichier I<fd>."
372
373 #. type: Plain text
374 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
375 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
376 msgid ""
377 "The I<new_value> argument specifies the initial expiration and interval for "
378 "the timer. The I<itimerspec> structure used for this argument is described "
379 "in B<itimerspec>(3type)."
380 msgstr ""
381 "Le paramètre I<new_value> spécifie l'expiration initiale et l'intervalle de "
382 "la minuterie. La structure I<itimerspec> utilisée pour ce paramètre est "
383 "décrite dans I<itimerspec>(3type) :"
384
385 #. type: Plain text
386 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
387 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
388 msgid ""
389 "I<new_value.it_value> specifies the initial expiration of the timer, in "
390 "seconds and nanoseconds. Setting either field of I<new_value.it_value> to a "
391 "nonzero value arms the timer. Setting both fields of I<new_value.it_value> "
392 "to zero disarms the timer."
393 msgstr ""
394 "I<new_value.it_value> spécifie l'expiration initiale de la minuterie, en "
395 "secondes et nanosecondes. Une valeur non nulle dans un des champs de "
396 "I<new_value.it_value> arme la minuterie. La minuterie est désarmée si les "
397 "deux champs de I<new_value.it_value> sont mis à zéro."
398
399 #. type: Plain text
400 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
401 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
402 msgid ""
403 "Setting one or both fields of I<new_value.it_interval> to nonzero values "
404 "specifies the period, in seconds and nanoseconds, for repeated timer "
405 "expirations after the initial expiration. If both fields of "
406 "I<new_value.it_interval> are zero, the timer expires just once, at the time "
407 "specified by I<new_value.it_value>."
408 msgstr ""
409 "Une valeur non nulle dans un des champs de I<new_value.it_interval> "
410 "configure la période, en secondes et nanosecondes, pour une expiration "
411 "répétitive après l'expiration initiale. Si les deux champs de "
412 "I<new_value.it_interval> sont nuls, la minuterie expirera qu'une seule fois, "
413 "dont l'heure est spécifiée dans I<new_value.it_value>."
414
415 #. type: Plain text
416 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
417 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
418 msgid ""
419 "By default, the initial expiration time specified in I<new_value> is "
420 "interpreted relative to the current time on the timer's clock at the time of "
421 "the call (i.e., I<new_value.it_value> specifies a time relative to the "
422 "current value of the clock specified by I<clockid>). An absolute timeout "
423 "can be selected via the I<flags> argument."
424 msgstr ""
425 "Par défaut, l'heure d'expiration initiale spécifiée dans I<new_value> est "
426 "interprétée de façon relative par rapport à l'heure actuelle sur l'horloge "
427 "de la minuterie au moment de l'appel (c'est-à-dire que I<new_value.it_value> "
428 "indique une heure relative à la valeur actuelle de l'horloge spécifiée par "
429 "I<clockid>). Un délai absolu peut être sélectionné avec le paramètre "
430 "I<flags>."
431
432 #. type: Plain text
433 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
434 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
435 msgid ""
436 "The I<flags> argument is a bit mask that can include the following values:"
437 msgstr ""
438 "Le paramètre I<flags> est un masque de bits qui peut avoir les valeurs "
439 "suivantes :"
440
441 #. type: TP
442 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
443 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
444 #, no-wrap
445 msgid "B<TFD_TIMER_ABSTIME>"
446 msgstr "B<TFD_TIMER_ABSTIME>"
447
448 #. type: Plain text
449 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
450 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
451 msgid ""
452 "Interpret I<new_value.it_value> as an absolute value on the timer's clock. "
453 "The timer will expire when the value of the timer's clock reaches the value "
454 "specified in I<new_value.it_value>."
455 msgstr ""
456 "Interpréter I<new_value.it_value> comme une valeur absolue sur l'horloge de "
457 "la minuterie. La minuterie expirera quand la valeur de l'horloge de la "
458 "minuterie atteint la valeur spécifiée dans I<new_value.it_value>."
459
460 #. type: TP
461 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
462 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
463 #, no-wrap
464 msgid "B<TFD_TIMER_CANCEL_ON_SET>"
465 msgstr "B<TFD_TIMER_CANCEL_ON_SET>"
466
467 #. type: Plain text
468 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
469 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
470 msgid ""
471 "If this flag is specified along with B<TFD_TIMER_ABSTIME> and the clock for "
472 "this timer is B<CLOCK_REALTIME> or B<CLOCK_REALTIME_ALARM>, then mark this "
473 "timer as cancelable if the real-time clock undergoes a discontinuous change "
474 "(B<settimeofday>(2), B<clock_settime>(2), or similar). When such changes "
475 "occur, a current or future B<read>(2) from the file descriptor will fail "
476 "with the error B<ECANCELED>."
477 msgstr ""
478 "Si cet attribut est spécifié en même temps que B<TFD_TIMER_ABSTIME> et si "
479 "l'horloge pour cette minuterie est B<CLOCK_REALTIME> ou "
480 "B<CLOCK_REALTIME_ALARM>, alors marquer cette minuterie comme annulable si "
481 "l'horloge en temps réel subit une modification discontinue "
482 "(B<settimeofday>(2), B<clock_settime>(2) ou similaire). Quand des "
483 "modifications se produisent, un appel actuel ou futur à B<read>(2) à partir "
484 "du descripteur de fichier échouera avec l’erreur B<ECANCELED>."
485
486 #. type: Plain text
487 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
488 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
489 msgid ""
490 "If the I<old_value> argument is not NULL, then the I<itimerspec> structure "
491 "that it points to is used to return the setting of the timer that was "
492 "current at the time of the call; see the description of "
493 "B<timerfd_gettime>() following."
494 msgstr ""
495 "Si le paramètre I<old_value> n'est pas égal à NULL, la structure "
496 "I<itimerspec> vers laquelle il pointe est utilisée pour renvoyer la "
497 "configuration de la minuterie au moment de l'appel ; consultez la "
498 "description de B<timerfd_gettime>() ci-dessous."
499
500 #. type: SS
501 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
502 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
503 #, no-wrap
504 msgid "timerfd_gettime()"
505 msgstr "timerfd_gettime()"
506
507 #. type: Plain text
508 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
509 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
510 msgid ""
511 "B<timerfd_gettime>() returns, in I<curr_value>, an I<itimerspec> structure "
512 "that contains the current setting of the timer referred to by the file "
513 "descriptor I<fd>."
514 msgstr ""
515 "B<timerfd_gettime>() renvoie, dans I<curr_value>, une structure "
516 "I<itimerspec> qui contient les paramètres actuels de la minuterie auquel le "
517 "descripteur de fichier I<fd> fait référence."
518
519 #. type: Plain text
520 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
521 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
522 msgid ""
523 "The I<it_value> field returns the amount of time until the timer will next "
524 "expire. If both fields of this structure are zero, then the timer is "
525 "currently disarmed. This field always contains a relative value, regardless "
526 "of whether the B<TFD_TIMER_ABSTIME> flag was specified when setting the "
527 "timer."
528 msgstr ""
529 "Le champ I<it_value> renvoie la durée jusqu'à la prochaine expiration. Si "
530 "les deux champs de cette structure sont nuls, alors la minuterie est "
531 "actuellement désactivée. Ce champ contient toujours une valeur relative, "
532 "sans tenir compte d'un attribut B<TFD_TIMER_ABSTIME> qui aurait été spécifié "
533 "quand la minuterie a été configurée."
534
535 #. type: Plain text
536 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
537 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
538 msgid ""
539 "The I<it_interval> field returns the interval of the timer. If both fields "
540 "of this structure are zero, then the timer is set to expire just once, at "
541 "the time specified by I<curr_value.it_value>."
542 msgstr ""
543 "Le champ I<it_interval> renvoie l'intervalle de la minuterie. Si les deux "
544 "champs de cette structure sont nuls, alors la minuteries est configurée pour "
545 "n'expirer qu'une seule fois, à l'heure spécifiée par I<curr_value.it_value>."
546
547 #. type: SS
548 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
549 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
550 #, no-wrap
551 msgid "Operating on a timer file descriptor"
552 msgstr "Opérations sur un descripteur de fichier de minuterie"
553
554 #. type: Plain text
555 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
556 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
557 msgid ""
558 "The file descriptor returned by B<timerfd_create>() supports the following "
559 "additional operations:"
560 msgstr ""
561 "Le descripteur de fichier renvoyé par B<timerfd_create>() gère les "
562 "opérations supplémentaires suivantes :"
563
564 #. type: TP
565 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
566 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
567 #, no-wrap
568 msgid "B<read>(2)"
569 msgstr "B<read>(2)"
570
571 #. type: Plain text
572 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
573 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
574 msgid ""
575 "If the timer has already expired one or more times since its settings were "
576 "last modified using B<timerfd_settime>(), or since the last successful "
577 "B<read>(2), then the buffer given to B<read>(2) returns an unsigned 8-byte "
578 "integer (I<uint64_t>) containing the number of expirations that have "
579 "occurred. (The returned value is in host byte order\\[em]that is, the "
580 "native byte order for integers on the host machine.)"
581 msgstr ""
582 "Si la minuterie a déjà expirée une fois ou plus depuis que sa configuration "
583 "a été modifiée la dernière fois à l'aide de B<timerfd_settime>() ou depuis "
584 "la dernière lecture avec B<read>(2) qui a réussi, alors le tampon fourni à "
585 "B<read>(2) renvoie un entier non signé sur 8 octets (I<uint64_t>) qui "
586 "contient le nombre d'expirations qui se sont produites. (La valeur renvoyée "
587 "utilise l'ordre des octets de l'hôte, c'est-à-dire l'ordre des octets natif "
588 "pour les entiers sur la machine hôte.)"
589
590 #. type: Plain text
591 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
592 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
593 msgid ""
594 "If no timer expirations have occurred at the time of the B<read>(2), then "
595 "the call either blocks until the next timer expiration, or fails with the "
596 "error B<EAGAIN> if the file descriptor has been made nonblocking (via the "
597 "use of the B<fcntl>(2) B<F_SETFL> operation to set the B<O_NONBLOCK> flag)."
598 msgstr ""
599 "Si aucune expiration ne s'est produite au moment de l'appel à B<read>(2), "
600 "l'appel bloquera jusqu'à la prochaine expiration ou échouera avec l'erreur "
601 "B<EAGAIN> si le descripteur de fichier est en mode non bloquant (à l'aide de "
602 "de l'opération B<F_SETFL> de B<fcntl>(2) pour régler l'attribut "
603 "B<O_NONBLOCK>)."
604
605 #. type: Plain text
606 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
607 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
608 msgid ""
609 "A B<read>(2) fails with the error B<EINVAL> if the size of the supplied "
610 "buffer is less than 8 bytes."
611 msgstr ""
612 "Un B<read>(2) échouera avec l'erreur B<EINVAL> si la taille du tampon fourni "
613 "est de moins de 8 octets."
614
615 #. type: Plain text
616 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
617 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
618 msgid ""
619 "If the associated clock is either B<CLOCK_REALTIME> or "
620 "B<CLOCK_REALTIME_ALARM>, the timer is absolute (B<TFD_TIMER_ABSTIME>), and "
621 "the flag B<TFD_TIMER_CANCEL_ON_SET> was specified when calling "
622 "B<timerfd_settime>(), then B<read>(2) fails with the error B<ECANCELED> if "
623 "the real-time clock undergoes a discontinuous change. (This allows the "
624 "reading application to discover such discontinuous changes to the clock.)"
625 msgstr ""
626 "Si l'horloge associée est soit B<CLOCK_REALTIME> ou B<CLOCK_REALTIME_ALARM>, "
627 "si la minuterie est absolue (B<TFD_TIMER_ABSTIME>) et si l'attribut "
628 "B<TFD_TIMER_CANCEL_ON_SET> a été spécifié lors de l'appel "
629 "B<timerfd_settime>(), alors l'appel à B<read>(2) échoue avec l'erreur "
630 "B<ECANCELED> si l'horloge en temps réel subit une modification discontinue. "
631 "(Cela permet à l'application qui lit de découvrir ce type de modifications "
632 "discontinues à l'horloge.)"
633
634 #. type: Plain text
635 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
636 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
637 msgid ""
638 "If the associated clock is either B<CLOCK_REALTIME> or "
639 "B<CLOCK_REALTIME_ALARM>, the timer is absolute (B<TFD_TIMER_ABSTIME>), and "
640 "the flag B<TFD_TIMER_CANCEL_ON_SET> was I<not> specified when calling "
641 "B<timerfd_settime>(), then a discontinuous negative change to the clock "
642 "(e.g., B<clock_settime>(2)) may cause B<read>(2) to unblock, but return a "
643 "value of 0 (i.e., no bytes read), if the clock change occurs after the time "
644 "expired, but before the B<read>(2) on the file descriptor."
645 msgstr ""
646 "Si l'horloge associée est soit B<CLOCK_REALTIME> ou B<CLOCK_REALTIME_ALARM>, "
647 "si la minuterie est absolue (B<TFD_TIMER_ABSTIME>) et si l'attribut "
648 "B<TFD_TIMER_CANCEL_ON_SET> a été spécifié lors de l'appel "
649 "B<timerfd_settime>(), alors une modification négative discontinue à "
650 "l'horloge (par exemple, B<clock_settime>(2)) peut faire à que B<read>(2) "
651 "supprime le blocage, mais renvoie une valeur de B<0> (c'est-à-dire qu'aucun "
652 "octet n'est lu), si une modification d'horloge survient après que le temps "
653 "soit expiré, mais avant le B<read>(2) sur le descripteur de fichier."
654
655 #. type: TP
656 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
657 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
658 #, no-wrap
659 msgid "B<poll>(2)"
660 msgstr "B<poll>(2)"
661
662 #. type: TQ
663 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
664 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
665 #, no-wrap
666 msgid "B<select>(2)"
667 msgstr "B<select>(2)"
668
669 #. type: TQ
670 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
671 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
672 #, no-wrap
673 msgid "(and similar)"
674 msgstr "(et similaire)"
675
676 #. type: Plain text
677 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
678 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
679 msgid ""
680 "The file descriptor is readable (the B<select>(2) I<readfds> argument; the "
681 "B<poll>(2) B<POLLIN> flag) if one or more timer expirations have occurred."
682 msgstr ""
683 "Le descripteur de fichier est lisible (le paramètre I<readfds> de "
684 "B<select>(2) ; l'attribut B<POLLIN> de B<poll>(2)) si une expiration (ou "
685 "plus) de la minuterie s'est produite."
686
687 #. type: Plain text
688 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
689 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
690 msgid ""
691 "The file descriptor also supports the other file-descriptor multiplexing "
692 "APIs: B<pselect>(2), B<ppoll>(2), and B<epoll>(7)."
693 msgstr ""
694 "Le descripteur de fichier prend également en charge les autres interfaces de "
695 "multiplexage de descripteurs de fichier : B<pselect>(2), B<ppoll>(2) et "
696 "B<epoll>(7)."
697
698 #. type: TP
699 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
700 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
701 #, no-wrap
702 msgid "B<ioctl>(2)"
703 msgstr "B<ioctl>(2)"
704
705 #. type: Plain text
706 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
707 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
708 msgid "The following timerfd-specific command is supported:"
709 msgstr "La commande suivante spécifique à timerfd est prise en charge :"
710
711 #. type: TP
712 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
713 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
714 #, no-wrap
715 msgid "B<TFD_IOC_SET_TICKS> (since Linux 3.17)"
716 msgstr "B<TFD_IOC_SET_TICKS> (depuis Linux 3.17)"
717
718 #. commit 5442e9fbd7c23172a1c9bc736629cd123a9923f0
719 #. type: Plain text
720 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
721 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
722 msgid ""
723 "Adjust the number of timer expirations that have occurred. The argument is "
724 "a pointer to a nonzero 8-byte integer (I<uint64_t>*) containing the new "
725 "number of expirations. Once the number is set, any waiter on the timer is "
726 "woken up. The only purpose of this command is to restore the expirations "
727 "for the purpose of checkpoint/restore. This operation is available only if "
728 "the kernel was configured with the B<CONFIG_CHECKPOINT_RESTORE> option."
729 msgstr ""
730 "Ajuste le nombre d'expirations de minuterie qui sont survenues. Le paramètre "
731 "est un pointeur vers un entier de 8 octets différent de zéro (I<uint64_t>*) "
732 "contenant le nouveau nombre d'expirations. Une fois que le nombre est "
733 "défini, tout processus en attente de la minuterie est réveillé. Le seul "
734 "objectif de cette commande est de rétablir les expirations dans l'objectif "
735 "de points de vérification ou de restauration. Cette opération est disponible "
736 "seulement si le noyau a été configuré avec l'option "
737 "B<CONFIG_CHECKPOINT_RESTORE>."
738
739 #. type: TP
740 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
741 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
742 #, no-wrap
743 msgid "B<close>(2)"
744 msgstr "B<close>(2)"
745
746 #. type: Plain text
747 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
748 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
749 msgid ""
750 "When the file descriptor is no longer required it should be closed. When "
751 "all file descriptors associated with the same timer object have been closed, "
752 "the timer is disarmed and its resources are freed by the kernel."
753 msgstr ""
754 "Quand le descripteur de fichier n'est plus nécessaire il doit être fermé. "
755 "Quand tous les descripteurs de fichier associés au même objet minuterie ont "
756 "été fermés, la minuterie est désarmée et ses ressources sont libérées par le "
757 "noyau."
758
759 #. type: SS
760 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
761 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
762 #, no-wrap
763 msgid "fork(2) semantics"
764 msgstr "Sémantique de B<fork>(2)"
765
766 #. type: Plain text
767 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
768 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
769 msgid ""
770 "After a B<fork>(2), the child inherits a copy of the file descriptor created "
771 "by B<timerfd_create>(). The file descriptor refers to the same underlying "
772 "timer object as the corresponding file descriptor in the parent, and "
773 "B<read>(2)s in the child will return information about expirations of the "
774 "timer."
775 msgstr ""
776 "Après un B<fork>(2), l'enfant hérite d'une copie du descripteur de fichier "
777 "créé par B<timerfd_create>(). Le descripteur de fichier se réfère au même "
778 "objet minuterie sous-jacent que le descripteur de fichier correspondant dans "
779 "le parent, et un B<read>(2) de l'enfant renverra les informations sur les "
780 "expirations de la minuterie."
781
782 #. type: SS
783 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
784 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
785 #, no-wrap
786 msgid "execve(2) semantics"
787 msgstr "Sémantique de B<execve>(2)"
788
789 #. type: Plain text
790 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
791 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
792 msgid ""
793 "A file descriptor created by B<timerfd_create>() is preserved across "
794 "B<execve>(2), and continues to generate timer expirations if the timer was "
795 "armed."
796 msgstr ""
797 "Un descripteur de fichier créé par B<timerfd_create>() est conservé au "
798 "travers d'un B<execve>(2), et continue à générer des expirations de "
799 "minuterie si la minuterie a été armée."
800
801 #. type: SH
802 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
803 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
804 #, no-wrap
805 msgid "RETURN VALUE"
806 msgstr "VALEUR RENVOYÉE"
807
808 #. type: Plain text
809 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
810 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
811 msgid ""
812 "On success, B<timerfd_create>() returns a new file descriptor. On error, "
813 "-1 is returned and I<errno> is set to indicate the error."
814 msgstr ""
815 "S'il réussit, B<timerfd_create>() renvoie un nouveau descripteur de fichier. "
816 "En cas d'erreur, il renvoie B<-1> et I<errno> est défini pour indiquer "
817 "l'erreur."
818
819 #. type: Plain text
820 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
821 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
822 msgid ""
823 "B<timerfd_settime>() and B<timerfd_gettime>() return 0 on success; on "
824 "error they return -1, and set I<errno> to indicate the error."
825 msgstr ""
826 "En cas de réussite, B<timerfd_settime>() et B<timerfd_gettime>() renvoient "
827 "B<0>. Sinon ils renvoient B<-1> et définissent B<errno> pour indiquer "
828 "l'erreur."
829
830 #. type: SH
831 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
832 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
833 #, no-wrap
834 msgid "ERRORS"
835 msgstr "ERREURS"
836
837 #. type: Plain text
838 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
839 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
840 msgid "B<timerfd_create>() can fail with the following errors:"
841 msgstr "B<timerfd_create>() peut échouer avec les erreurs suivantes :"
842
843 #. type: TP
844 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
845 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
846 #, no-wrap
847 msgid "B<EINVAL>"
848 msgstr "B<EINVAL>"
849
850 #. type: Plain text
851 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
852 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
853 msgid "The I<clockid> is not valid."
854 msgstr "Le I<clockid> n'est pas valable."
855
856 #. type: Plain text
857 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
858 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
859 msgid ""
860 "I<flags> is invalid; or, in Linux 2.6.26 or earlier, I<flags> is nonzero."
861 msgstr ""
862 "I<flags> n'est pas correct ; ou, pour les versions de Linux 2.6.26 ou "
863 "antérieures, I<flags> n'est pas nul."
864
865 #. type: TP
866 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
867 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
868 #, no-wrap
869 msgid "B<EMFILE>"
870 msgstr "B<EMFILE>"
871
872 #. type: Plain text
873 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
874 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
875 msgid ""
876 "The per-process limit on the number of open file descriptors has been "
877 "reached."
878 msgstr ""
879 "La limite du nombre de descripteurs de fichiers par processus a été atteinte."
880
881 #. type: TP
882 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
883 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
884 #, no-wrap
885 msgid "B<ENFILE>"
886 msgstr "B<ENFILE>"
887
888 #. type: Plain text
889 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
890 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
891 msgid ""
892 "The system-wide limit on the total number of open files has been reached."
893 msgstr ""
894 "La limite du nombre total de fichiers ouverts pour le système entier a été "
895 "atteinte."
896
897 #. type: TP
898 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
899 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
900 #, no-wrap
901 msgid "B<ENODEV>"
902 msgstr "B<ENODEV>"
903
904 #. type: Plain text
905 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
906 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
907 msgid "Could not mount (internal) anonymous inode device."
908 msgstr "Impossible de monter (en interne) le périphérique anonyme d'inœud."
909
910 #. type: TP
911 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
912 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
913 #, no-wrap
914 msgid "B<ENOMEM>"
915 msgstr "B<ENOMEM>"
916
917 #. type: Plain text
918 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
919 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
920 msgid "There was insufficient kernel memory to create the timer."
921 msgstr "Pas assez de mémoire noyau pour créer la minuterie."
922
923 #. type: TP
924 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
925 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
926 #, no-wrap
927 msgid "B<EPERM>"
928 msgstr "B<EPERM>"
929
930 #. type: Plain text
931 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
932 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
933 msgid ""
934 "I<clockid> was B<CLOCK_REALTIME_ALARM> or B<CLOCK_BOOTTIME_ALARM> but the "
935 "caller did not have the B<CAP_WAKE_ALARM> capability."
936 msgstr ""
937 "I<clockid> était B<CLOCK_REALTIME_ALARM> ou B<CLOCK_BOOTTIME_ALARM>, mais "
938 "l'appelant n'a pas la capacité B<CAP_WAKE_ALARM>."
939
940 #. type: Plain text
941 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
942 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
943 msgid ""
944 "B<timerfd_settime>() and B<timerfd_gettime>() can fail with the following "
945 "errors:"
946 msgstr ""
947 "B<timerfd_settime>() et B<timerfd_gettime>() peuvent échouer avec les "
948 "erreurs suivantes :"
949
950 #. type: TP
951 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
952 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
953 #, no-wrap
954 msgid "B<EBADF>"
955 msgstr "B<EBADF>"
956
957 #. type: Plain text
958 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
959 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
960 msgid "I<fd> is not a valid file descriptor."
961 msgstr "I<fd> n'est pas un descripteur de fichier valable."
962
963 #. type: TP
964 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
965 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
966 #, no-wrap
967 msgid "B<EFAULT>"
968 msgstr "B<EFAULT>"
969
970 #. type: Plain text
971 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
972 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
973 msgid "I<new_value>, I<old_value>, or I<curr_value> is not a valid pointer."
974 msgstr ""
975 "I<new_value>, I<old_value> ou I<curr_value> n'est pas un pointeur valable."
976
977 #. type: Plain text
978 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
979 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
980 msgid "I<fd> is not a valid timerfd file descriptor."
981 msgstr "I<fd> n'est pas un descripteur de fichier de minuterie valable."
982
983 #. type: Plain text
984 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
985 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
986 msgid "B<timerfd_settime>() can also fail with the following errors:"
987 msgstr "B<timerfd_settime>() peut aussi échouer avec les erreurs suivantes :"
988
989 #. type: TP
990 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
991 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
992 #, no-wrap
993 msgid "B<ECANCELED>"
994 msgstr "B<ECANCELED>"
995
996 #. type: Plain text
997 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
998 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
999 msgid "See NOTES."
1000 msgstr "Voir NOTES"
1001
1002 #. type: Plain text
1003 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1004 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1005 msgid ""
1006 "I<new_value> is not properly initialized (one of the I<tv_nsec> falls "
1007 "outside the range zero to 999,999,999)."
1008 msgstr ""
1009 "I<new_value> n'est pas initialisé correctement (un des champs I<tv_nsec> est "
1010 "en dehors de l'intervalle allant de 0 à 999 999 999)."
1011
1012 #. This case only checked since Linux 2.6.29, and Linux 2.2.2[78].some-stable-version.
1013 #. In older kernel versions, no check was made for invalid flags.
1014 #. type: Plain text
1015 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1016 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1017 msgid "I<flags> is invalid."
1018 msgstr "I<flags> n'est pas correct."
1019
1020 #. type: SH
1021 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1022 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1023 #, no-wrap
1024 msgid "STANDARDS"
1025 msgstr "NORMES"
1026
1027 #. type: Plain text
1028 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1029 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1030 msgid "Linux."
1031 msgstr "Linux."
1032
1033 #. type: SH
1034 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1035 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1036 #, no-wrap
1037 msgid "HISTORY"
1038 msgstr "HISTORIQUE"
1039
1040 #. type: Plain text
1041 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1042 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1043 msgid "Linux 2.6.25, glibc 2.8."
1044 msgstr "Linux 2.6.25, glibc 2.8."
1045
1046 #. type: SH
1047 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1048 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1049 #, no-wrap
1050 msgid "NOTES"
1051 msgstr "NOTES"
1052
1053 #. type: Plain text
1054 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1055 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1056 msgid ""
1057 "Suppose the following scenario for B<CLOCK_REALTIME> or "
1058 "B<CLOCK_REALTIME_ALARM> timer that was created with B<timerfd_create>():"
1059 msgstr ""
1060 "En supposant le scénario suivant pour une minuterie B<CLOCK_REALTIME> ou "
1061 "B<CLOCK_REALTIME_ALARM> créée avec B<timerfd_create>() :"
1062
1063 #. type: IP
1064 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1065 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1066 #, no-wrap
1067 msgid "(1)"
1068 msgstr "(1)"
1069
1070 #. type: Plain text
1071 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1072 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1073 msgid ""
1074 "The timer has been started (B<timerfd_settime>()) with the "
1075 "B<TFD_TIMER_ABSTIME> and B<TFD_TIMER_CANCEL_ON_SET> flags;"
1076 msgstr ""
1077 "la minuterie a été démarrée (B<timerfd_settime>()) avec les attributs "
1078 "B<TFD_TIMER_ABSTIME> et B<TFD_TIMER_CANCEL_ON_SET> ;"
1079
1080 #. type: IP
1081 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1082 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1083 #, no-wrap
1084 msgid "(2)"
1085 msgstr "(2)"
1086
1087 #. type: Plain text
1088 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1089 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1090 msgid ""
1091 "A discontinuous change (e.g., B<settimeofday>(2)) is subsequently made to "
1092 "the B<CLOCK_REALTIME> clock; and"
1093 msgstr ""
1094 "une modification discontinue (par exemple, B<settimeofday>(2)) est ensuite "
1095 "appliquée à l'horloge B<CLOCK_REALTIME> ;"
1096
1097 #. type: IP
1098 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1099 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1100 #, no-wrap
1101 msgid "(3)"
1102 msgstr "(3)"
1103
1104 #. type: Plain text
1105 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1106 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1107 msgid ""
1108 "the caller once more calls B<timerfd_settime>() to rearm the timer (without "
1109 "first doing a B<read>(2) on the file descriptor)."
1110 msgstr ""
1111 "l'appelant appelle une fois de plus B<timerfd_settime>() pour réarmer la "
1112 "minuterie (sans exécuter préalablement un B<read>(2) sur le descripteur de "
1113 "fichier)."
1114
1115 #. type: Plain text
1116 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1117 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1118 msgid "In this case the following occurs:"
1119 msgstr "Dans ce cas les événements suivants se produisent :"
1120
1121 #. type: IP
1122 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1123 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1124 #, no-wrap
1125 msgid "\\[bu]"
1126 msgstr "-"
1127
1128 #. type: Plain text
1129 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1130 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1131 msgid ""
1132 "The B<timerfd_settime>() returns -1 with I<errno> set to B<ECANCELED>. "
1133 "(This enables the caller to know that the previous timer was affected by a "
1134 "discontinuous change to the clock.)"
1135 msgstr ""
1136 "B<timerfd_settime>() renvoie B<-1> avec I<errno> défini à B<ECANCELED>. "
1137 "(Cela permet à l'appelant de savoir que la minuterie précédente a été "
1138 "affectée par une modification discontinue de l'horloge.)"
1139
1140 #. type: Plain text
1141 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
1142 #: opensuse-tumbleweed
1143 msgid ""
1144 "The timer I<is successfully rearmed> with the settings provided in the "
1145 "second B<timerfd_settime>() call. (This was probably an implementation "
1146 "accident, but won't be fixed now, in case there are applications that depend "
1147 "on this behavior.)"
1148 msgstr ""
1149 "La minuterie I<est réarmée avec succès> avec les réglages fournis dans le "
1150 "second appel B<timerfd_settime>(). (C'est probablement un accident "
1151 "d'implémentation, mais ne sera pas corrigé maintenant au cas où des "
1152 "applications dépendent de ce comportement.)"
1153
1154 #. type: SH
1155 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1156 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1157 #, no-wrap
1158 msgid "BUGS"
1159 msgstr "BOGUES"
1160
1161 #. 2.6.29
1162 #. type: Plain text
1163 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1164 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1165 msgid ""
1166 "Currently, B<timerfd_create>() supports fewer types of clock IDs than "
1167 "B<timer_create>(2)."
1168 msgstr ""
1169 "Actuellement, B<timerfd_create>() prend en charge moins de types "
1170 "d'identifiant d'horloges que B<timer_create>(2)."
1171
1172 #. type: SH
1173 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1174 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1175 #, no-wrap
1176 msgid "EXAMPLES"
1177 msgstr "EXEMPLES"
1178
1179 #. type: Plain text
1180 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1181 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1182 msgid ""
1183 "The following program creates a timer and then monitors its progress. The "
1184 "program accepts up to three command-line arguments. The first argument "
1185 "specifies the number of seconds for the initial expiration of the timer. "
1186 "The second argument specifies the interval for the timer, in seconds. The "
1187 "third argument specifies the number of times the program should allow the "
1188 "timer to expire before terminating. The second and third command-line "
1189 "arguments are optional."
1190 msgstr ""
1191 "Le programme suivant crée une minuterie puis surveille sa progression. Le "
1192 "programme accepte jusqu'à trois paramètres en ligne de commande. Le premier "
1193 "paramètre spécifie le nombre de secondes pour l'expiration initiale de la "
1194 "minuterie. Le deuxième paramètre spécifie l'intervallse de la minuterie, en "
1195 "secondes. Le troisième paramètre spécifie le nombre de fois que le programme "
1196 "doit permettre à la minuterie d'expirer avant de quitter. Le deuxième et le "
1197 "troisième paramètre sont optionnels."
1198
1199 #. type: Plain text
1200 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1201 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1202 msgid "The following shell session demonstrates the use of the program:"
1203 msgstr ""
1204 "La session interactive suivante montre l'utilisation de ce programme\\ :"
1205
1206 #. type: Plain text
1207 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
1208 #: opensuse-tumbleweed
1209 #, no-wrap
1210 msgid ""
1211 "$B< a.out 3 1 100>\n"
1212 "0.000:\ttimer started\n"
1213 "3.000:\tread: 1; total=1\n"
1214 "4.000:\tread: 1; total=2\n"
1215 "B<\\[ha]Z > # type control-Z to suspend the program\n"
1216 "[1]+ Stopped ./timerfd3_demo 3 1 100\n"
1217 "$ B<fg> # Resume execution after a few seconds\n"
1218 "a.out 3 1 100\n"
1219 "9.660:\tread: 5; total=7\n"
1220 "10.000:\tread: 1; total=8\n"
1221 "11.000:\tread: 1; total=9\n"
1222 "B<\\[ha]C > # type control-C to suspend the program\n"
1223 msgstr ""
1224 "$B< a.out 3 1 100>\n"
1225 "0.000: \ttimer started\n"
1226 "3.000: \tread: 1; total=1\n"
1227 "4.000: \tread: 1; total=2\n"
1228 "B<\\[ha]Z > # entrer Ctrl-Z pour suspendre le programme\n"
1229 "[1]+ Stopped ./timerfd3_demo 3 1 100\n"
1230 "$ B<fg> # Reprendre l'exécution après quelques secondes\n"
1231 "a.out 3 1 100\n"
1232 "9.660: \tread: 5; total=7\n"
1233 "10.000: \tread: 1; total=8\n"
1234 "11.000: \tread: 1; total=9\n"
1235 "B<\\[ha]C > # entrer Ctrl-C pour suspendre le programme\n"
1236
1237 #. type: SS
1238 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1239 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1240 #, no-wrap
1241 msgid "Program source"
1242 msgstr "Source du programme"
1243
1244 #
1245 #
1246 #
1247 #
1248 #
1249 #
1250 #
1251 #. The commented out code here is what we currently need until
1252 #. the required stuff is in glibc
1253 #. /* Link with \-lrt */
1254 #. #define _GNU_SOURCE
1255 #. #include <sys/syscall.h>
1256 #. #include <unistd.h>
1257 #. #include <time.h>
1258 #. #if defined(__i386__)
1259 #. #define __NR_timerfd_create 322
1260 #. #define __NR_timerfd_settime 325
1261 #. #define __NR_timerfd_gettime 326
1262 #. #endif
1263 #. static int
1264 #. timerfd_create(int clockid, int flags)
1265 #. {
1266 #. return syscall(__NR_timerfd_create, clockid, flags);
1267 #. }
1268 #. static int
1269 #. timerfd_settime(int fd, int flags, struct itimerspec *new_value,
1270 #. struct itimerspec *curr_value)
1271 #. {
1272 #. return syscall(__NR_timerfd_settime, fd, flags, new_value,
1273 #. curr_value);
1274 #. }
1275 #. static int
1276 #. timerfd_gettime(int fd, struct itimerspec *curr_value)
1277 #. {
1278 #. return syscall(__NR_timerfd_gettime, fd, curr_value);
1279 #. }
1280 #. #define TFD_TIMER_ABSTIME (1 << 0)
1281 #. ////////////////////////////////////////////////////////////
1282 #. type: Plain text
1283 #: archlinux debian-unstable opensuse-leap-16-1 opensuse-tumbleweed
1284 #, no-wrap
1285 msgid ""
1286 "#include E<lt>err.hE<gt>\n"
1287 "#include E<lt>inttypes.hE<gt>\n"
1288 "#include E<lt>stdio.hE<gt>\n"
1289 "#include E<lt>stdlib.hE<gt>\n"
1290 "#include E<lt>sys/timerfd.hE<gt>\n"
1291 "#include E<lt>sys/types.hE<gt>\n"
1292 "#include E<lt>time.hE<gt>\n"
1293 "#include E<lt>unistd.hE<gt>\n"
1294 "\\&\n"
1295 "static void\n"
1296 "print_elapsed_time(void)\n"
1297 "{\n"
1298 " int secs, nsecs;\n"
1299 " static int first_call = 1;\n"
1300 " struct timespec curr;\n"
1301 " static struct timespec start;\n"
1302 "\\&\n"
1303 " if (first_call) {\n"
1304 " first_call = 0;\n"
1305 " if (clock_gettime(CLOCK_MONOTONIC, &start) == -1)\n"
1306 " err(EXIT_FAILURE, \"clock_gettime\");\n"
1307 " }\n"
1308 "\\&\n"
1309 " if (clock_gettime(CLOCK_MONOTONIC, &curr) == -1)\n"
1310 " err(EXIT_FAILURE, \"clock_gettime\");\n"
1311 "\\&\n"
1312 " secs = curr.tv_sec - start.tv_sec;\n"
1313 " nsecs = curr.tv_nsec - start.tv_nsec;\n"
1314 " if (nsecs E<lt> 0) {\n"
1315 " secs--;\n"
1316 " nsecs += 1000000000;\n"
1317 " }\n"
1318 " printf(\"%d.%03d:\\[rs]t\", secs, (nsecs + 500000) / 1000000);\n"
1319 "}\n"
1320 "\\&\n"
1321 "int\n"
1322 "main(int argc, char *argv[])\n"
1323 "{\n"
1324 " int fd;\n"
1325 " ssize_t s;\n"
1326 " uint64_t expir, tot_expir, max_expir;\n"
1327 " struct timespec now;\n"
1328 " struct itimerspec new_value;\n"
1329 "\\&\n"
1330 " if (argc != 2 && argc != 4) {\n"
1331 " fprintf(stderr, \"%s init-secs [interval-secs max-num-expir]\\[rs]n\",\n"
1332 " argv[0]);\n"
1333 " exit(EXIT_FAILURE);\n"
1334 " }\n"
1335 "\\&\n"
1336 " if (clock_gettime(CLOCK_REALTIME, &now) == -1)\n"
1337 " err(EXIT_FAILURE, \"clock_gettime\");\n"
1338 "\\&\n"
1339 " /* Create a CLOCK_REALTIME absolute timer with initial\n"
1340 " expiration and interval as specified in command line. */\n"
1341 "\\&\n"
1342 " new_value.it_value.tv_sec = now.tv_sec + atoi(argv[1]);\n"
1343 " new_value.it_value.tv_nsec = now.tv_nsec;\n"
1344 " if (argc == 2) {\n"
1345 " new_value.it_interval.tv_sec = 0;\n"
1346 " max_expir = 1;\n"
1347 " } else {\n"
1348 " new_value.it_interval.tv_sec = atoi(argv[2]);\n"
1349 " max_expir = atoi(argv[3]);\n"
1350 " }\n"
1351 " new_value.it_interval.tv_nsec = 0;\n"
1352 "\\&\n"
1353 " fd = timerfd_create(CLOCK_REALTIME, 0);\n"
1354 " if (fd == -1)\n"
1355 " err(EXIT_FAILURE, \"timerfd_create\");\n"
1356 "\\&\n"
1357 " if (timerfd_settime(fd, TFD_TIMER_ABSTIME, &new_value, NULL) == -1)\n"
1358 " err(EXIT_FAILURE, \"timerfd_settime\");\n"
1359 "\\&\n"
1360 " print_elapsed_time();\n"
1361 " printf(\"timer started\\[rs]n\");\n"
1362 "\\&\n"
1363 " for (tot_expir = 0; tot_expir E<lt> max_expir;) {\n"
1364 " s = read(fd, &expir, sizeof(uint64_t));\n"
1365 " if (s != sizeof(uint64_t))\n"
1366 " err(EXIT_FAILURE, \"read\");\n"
1367 "\\&\n"
1368 " tot_expir += expir;\n"
1369 " print_elapsed_time();\n"
1370 " printf(\"read: %w64u; total=%w64u\\[rs]n\", expir, tot_expir);\n"
1371 " }\n"
1372 "\\&\n"
1373 " exit(EXIT_SUCCESS);\n"
1374 "}\n"
1375 msgstr ""
1376 "#include E<lt>err.hE<gt>\n"
1377 "#include E<lt>inttypes.hE<gt>\n"
1378 "#include E<lt>stdio.hE<gt>\n"
1379 "#include E<lt>stdlib.hE<gt>\n"
1380 "#include E<lt>sys/timerfd.hE<gt>\n"
1381 "#include E<lt>sys/types.hE<gt>\n"
1382 "#include E<lt>time.hE<gt>\n"
1383 "#include E<lt>unistd.hE<gt>\n"
1384 "\\&\n"
1385 "static void\n"
1386 "print_elapsed_time(void)\n"
1387 "{\n"
1388 " int secs, nsecs;\n"
1389 " static int first_call = 1;\n"
1390 " struct timespec curr;\n"
1391 " static struct timespec start;\n"
1392 "\\&\n"
1393 " if (first_call) {\n"
1394 " first_call = 0;\n"
1395 " if (clock_gettime(CLOCK_MONOTONIC, &start) == -1)\n"
1396 " err(EXIT_FAILURE, \"clock_gettime\");\n"
1397 " }\n"
1398 "\\&\n"
1399 " if (clock_gettime(CLOCK_MONOTONIC, &curr) == -1)\n"
1400 " err(EXIT_FAILURE, \"clock_gettime\");\n"
1401 "\\&\n"
1402 " secs = curr.tv_sec - start.tv_sec;\n"
1403 " nsecs = curr.tv_nsec - start.tv_nsec;\n"
1404 " if (nsecs E<lt> 0) {\n"
1405 " secs--;\n"
1406 " nsecs += 1000000000;\n"
1407 " }\n"
1408 " printf(\"%d.%03d:\\[rs]t\", secs, (nsecs + 500000) / 1000000);\n"
1409 "}\n"
1410 "\\&\n"
1411 "int\n"
1412 "main(int argc, char *argv[])\n"
1413 "{\n"
1414 " int fd;\n"
1415 " ssize_t s;\n"
1416 " uint64_t expir, tot_expir, max_expir;\n"
1417 " struct timespec now;\n"
1418 " struct itimerspec new_value;\n"
1419 "\\&\n"
1420 " if (argc != 2 && argc != 4) {\n"
1421 " fprintf(stderr, \"%s init-secs [interval-secs max-num-expir]\\[rs]n\",\n"
1422 " argv[0]);\n"
1423 " exit(EXIT_FAILURE);\n"
1424 " }\n"
1425 "\\&\n"
1426 " if (clock_gettime(CLOCK_REALTIME, &now) == -1)\n"
1427 " err(EXIT_FAILURE, \"clock_gettime\");\n"
1428 "\\&\n"
1429 " /* Créer une minuterie absolue CLOCK_REALTIME avec une expiration\n"
1430 " et un intervalle initiaux comme spécifié en ligne de commande. */\n"
1431 "\\&\n"
1432 " new_value.it_value.tv_sec = now.tv_sec + atoi(argv[1]);\n"
1433 " new_value.it_value.tv_nsec = now.tv_nsec;\n"
1434 " if (argc == 2) {\n"
1435 " new_value.it_interval.tv_sec = 0;\n"
1436 " max_expir = 1;\n"
1437 " } else {\n"
1438 " new_value.it_interval.tv_sec = atoi(argv[2]);\n"
1439 " max_expir = atoi(argv[3]);\n"
1440 " }\n"
1441 " new_value.it_interval.tv_nsec = 0;\n"
1442 "\\&\n"
1443 " fd = timerfd_create(CLOCK_REALTIME, 0);\n"
1444 " if (fd == -1)\n"
1445 " err(EXIT_FAILURE, \"timerfd_create\");\n"
1446 "\\&\n"
1447 " if (timerfd_settime(fd, TFD_TIMER_ABSTIME, &new_value, NULL) == -1)\n"
1448 " err(EXIT_FAILURE, \"timerfd_settime\");\n"
1449 "\\&\n"
1450 " print_elapsed_time();\n"
1451 " printf(\"timer started\\[rs]n\");\n"
1452 "\\&\n"
1453 " for (tot_expir = 0; tot_expir E<lt> max_expir;) {\n"
1454 " s = read(fd, &expir, sizeof(uint64_t));\n"
1455 " if (s != sizeof(uint64_t))\n"
1456 " err(EXIT_FAILURE, \"read\");\n"
1457 "\\&\n"
1458 " tot_expir += expir;\n"
1459 " print_elapsed_time();\n"
1460 " printf(\"read: %w64u; total=%w64u\\[rs]n\", expir, tot_expir);\n"
1461 " }\n"
1462 "\\&\n"
1463 " exit(EXIT_SUCCESS);\n"
1464 "}\n"
1465
1466 #. SRC END
1467 #. type: SH
1468 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1469 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1470 #, no-wrap
1471 msgid "SEE ALSO"
1472 msgstr "VOIR AUSSI"
1473
1474 #. type: Plain text
1475 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1476 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1477 msgid ""
1478 "B<eventfd>(2), B<poll>(2), B<read>(2), B<select>(2), B<setitimer>(2), "
1479 "B<signalfd>(2), B<timer_create>(2), B<timer_gettime>(2), "
1480 "B<timer_settime>(2), B<timespec>(3), B<epoll>(7), B<time>(7)"
1481 msgstr ""
1482 "B<eventfd>(2), B<poll>(2), B<read>(2), B<select>(2), B<setitimer>(2), "
1483 "B<signalfd>(2), B<timer_create>(2), B<timer_gettime>(2), "
1484 "B<timer_settime>(2), B<timespec>(3), B<epoll>(7), B<time>(7)"
1485
1486 #. type: TH
1487 #: debian-trixie
1488 #, no-wrap
1489 msgid "2024-06-15"
1490 msgstr "15 juin 2024"
1491
1492 #. type: TH
1493 #: debian-trixie
1494 #, no-wrap
1495 msgid "Linux man-pages 6.9.1"
1496 msgstr "Pages du manuel de Linux 6.9.1"
1497
1498 #. type: Plain text
1499 #: debian-trixie
1500 msgid "Standard C library (I<libc>, I<-lc>)"
1501 msgstr "Bibliothèque C standard (I<libc>, I<-lc>)"
1502
1503 #. type: Plain text
1504 #: debian-trixie fedora-44 fedora-rawhide
1505 msgid ""
1506 "The timer I<is successfully rearmed> with the settings provided in the "
1507 "second B<timerfd_settime>() call. (This was probably an implementation "
1508 "accident, but won't be fixed now, in case there are applications that depend "
1509 "on this behaviour.)"
1510 msgstr ""
1511 "La minuterie I<est réarmée avec succès> avec les réglages fournis dans le "
1512 "second appel B<timerfd_settime>(). (C'est probablement un accident "
1513 "d'implémentation, mais ne sera pas corrigé maintenant au cas où des "
1514 "applications dépendent de ce comportement.)"
1515
1516 #. type: Plain text
1517 #: debian-trixie fedora-44 fedora-rawhide
1518 #, no-wrap
1519 msgid ""
1520 "$B< a.out 3 1 100>\n"
1521 "0.000: timer started\n"
1522 "3.000: read: 1; total=1\n"
1523 "4.000: read: 1; total=2\n"
1524 "B<\\[ha]Z > # type control-Z to suspend the program\n"
1525 "[1]+ Stopped ./timerfd3_demo 3 1 100\n"
1526 "$ B<fg> # Resume execution after a few seconds\n"
1527 "a.out 3 1 100\n"
1528 "9.660: read: 5; total=7\n"
1529 "10.000: read: 1; total=8\n"
1530 "11.000: read: 1; total=9\n"
1531 "B<\\[ha]C > # type control-C to suspend the program\n"
1532 msgstr ""
1533 "$B< a.out 3 1 100>\n"
1534 "0.000: timer started\n"
1535 "3.000: read: 1; total=1\n"
1536 "4.000: read: 1; total=2\n"
1537 "B<\\[ha]Z > # entrer Ctrl-Z pour suspendre le programme\n"
1538 "[1]+ Stopped ./timerfd3_demo 3 1 100\n"
1539 "$ B<fg> # Reprendre l'exécution après quelques secondes\n"
1540 "a.out 3 1 100\n"
1541 "9.660: read: 5; total=7\n"
1542 "10.000: read: 1; total=8\n"
1543 "11.000: read: 1; total=9\n"
1544 "B<\\[ha]C > # entrer Ctrl-C pour suspendre le programme\n"
1545
1546 #
1547 #
1548 #
1549 #
1550 #
1551 #
1552 #
1553 #. The commented out code here is what we currently need until
1554 #. the required stuff is in glibc
1555 #. /* Link with \-lrt */
1556 #. #define _GNU_SOURCE
1557 #. #include <sys/syscall.h>
1558 #. #include <unistd.h>
1559 #. #include <time.h>
1560 #. #if defined(__i386__)
1561 #. #define __NR_timerfd_create 322
1562 #. #define __NR_timerfd_settime 325
1563 #. #define __NR_timerfd_gettime 326
1564 #. #endif
1565 #. static int
1566 #. timerfd_create(int clockid, int flags)
1567 #. {
1568 #. return syscall(__NR_timerfd_create, clockid, flags);
1569 #. }
1570 #. static int
1571 #. timerfd_settime(int fd, int flags, struct itimerspec *new_value,
1572 #. struct itimerspec *curr_value)
1573 #. {
1574 #. return syscall(__NR_timerfd_settime, fd, flags, new_value,
1575 #. curr_value);
1576 #. }
1577 #. static int
1578 #. timerfd_gettime(int fd, struct itimerspec *curr_value)
1579 #. {
1580 #. return syscall(__NR_timerfd_gettime, fd, curr_value);
1581 #. }
1582 #. #define TFD_TIMER_ABSTIME (1 << 0)
1583 #. ////////////////////////////////////////////////////////////
1584 #. type: Plain text
1585 #: debian-trixie fedora-44 fedora-rawhide
1586 #, no-wrap
1587 msgid ""
1588 "#include E<lt>err.hE<gt>\n"
1589 "#include E<lt>inttypes.hE<gt>\n"
1590 "#include E<lt>stdio.hE<gt>\n"
1591 "#include E<lt>stdlib.hE<gt>\n"
1592 "#include E<lt>sys/timerfd.hE<gt>\n"
1593 "#include E<lt>sys/types.hE<gt>\n"
1594 "#include E<lt>time.hE<gt>\n"
1595 "#include E<lt>unistd.hE<gt>\n"
1596 "\\&\n"
1597 "static void\n"
1598 "print_elapsed_time(void)\n"
1599 "{\n"
1600 " int secs, nsecs;\n"
1601 " static int first_call = 1;\n"
1602 " struct timespec curr;\n"
1603 " static struct timespec start;\n"
1604 "\\&\n"
1605 " if (first_call) {\n"
1606 " first_call = 0;\n"
1607 " if (clock_gettime(CLOCK_MONOTONIC, &start) == -1)\n"
1608 " err(EXIT_FAILURE, \"clock_gettime\");\n"
1609 " }\n"
1610 "\\&\n"
1611 " if (clock_gettime(CLOCK_MONOTONIC, &curr) == -1)\n"
1612 " err(EXIT_FAILURE, \"clock_gettime\");\n"
1613 "\\&\n"
1614 " secs = curr.tv_sec - start.tv_sec;\n"
1615 " nsecs = curr.tv_nsec - start.tv_nsec;\n"
1616 " if (nsecs E<lt> 0) {\n"
1617 " secs--;\n"
1618 " nsecs += 1000000000;\n"
1619 " }\n"
1620 " printf(\"%d.%03d: \", secs, (nsecs + 500000) / 1000000);\n"
1621 "}\n"
1622 "\\&\n"
1623 "int\n"
1624 "main(int argc, char *argv[])\n"
1625 "{\n"
1626 " int fd;\n"
1627 " ssize_t s;\n"
1628 " uint64_t exp, tot_exp, max_exp;\n"
1629 " struct timespec now;\n"
1630 " struct itimerspec new_value;\n"
1631 "\\&\n"
1632 " if (argc != 2 && argc != 4) {\n"
1633 " fprintf(stderr, \"%s init-secs [interval-secs max-exp]\\[rs]n\",\n"
1634 " argv[0]);\n"
1635 " exit(EXIT_FAILURE);\n"
1636 " }\n"
1637 "\\&\n"
1638 " if (clock_gettime(CLOCK_REALTIME, &now) == -1)\n"
1639 " err(EXIT_FAILURE, \"clock_gettime\");\n"
1640 "\\&\n"
1641 " /* Create a CLOCK_REALTIME absolute timer with initial\n"
1642 " expiration and interval as specified in command line. */\n"
1643 "\\&\n"
1644 " new_value.it_value.tv_sec = now.tv_sec + atoi(argv[1]);\n"
1645 " new_value.it_value.tv_nsec = now.tv_nsec;\n"
1646 " if (argc == 2) {\n"
1647 " new_value.it_interval.tv_sec = 0;\n"
1648 " max_exp = 1;\n"
1649 " } else {\n"
1650 " new_value.it_interval.tv_sec = atoi(argv[2]);\n"
1651 " max_exp = atoi(argv[3]);\n"
1652 " }\n"
1653 " new_value.it_interval.tv_nsec = 0;\n"
1654 "\\&\n"
1655 " fd = timerfd_create(CLOCK_REALTIME, 0);\n"
1656 " if (fd == -1)\n"
1657 " err(EXIT_FAILURE, \"timerfd_create\");\n"
1658 "\\&\n"
1659 " if (timerfd_settime(fd, TFD_TIMER_ABSTIME, &new_value, NULL) == -1)\n"
1660 " err(EXIT_FAILURE, \"timerfd_settime\");\n"
1661 "\\&\n"
1662 " print_elapsed_time();\n"
1663 " printf(\"timer started\\[rs]n\");\n"
1664 "\\&\n"
1665 " for (tot_exp = 0; tot_exp E<lt> max_exp;) {\n"
1666 " s = read(fd, &exp, sizeof(uint64_t));\n"
1667 " if (s != sizeof(uint64_t))\n"
1668 " err(EXIT_FAILURE, \"read\");\n"
1669 "\\&\n"
1670 " tot_exp += exp;\n"
1671 " print_elapsed_time();\n"
1672 " printf(\"read: %\" PRIu64 \"; total=%\" PRIu64 \"\\[rs]n\", exp, tot_exp);\n"
1673 " }\n"
1674 "\\&\n"
1675 " exit(EXIT_SUCCESS);\n"
1676 "}\n"
1677 msgstr ""
1678 "#include E<lt>err.hE<gt>\n"
1679 "#include E<lt>inttypes.hE<gt>\n"
1680 "#include E<lt>stdio.hE<gt>\n"
1681 "#include E<lt>stdlib.hE<gt>\n"
1682 "#include E<lt>sys/timerfd.hE<gt>\n"
1683 "#include E<lt>sys/types.hE<gt>\n"
1684 "#include E<lt>time.hE<gt>\n"
1685 "#include E<lt>unistd.hE<gt>\n"
1686 "\\&\n"
1687 "static void\n"
1688 "print_elapsed_time(void)\n"
1689 "{\n"
1690 " int secs, nsecs;\n"
1691 " static int first_call = 1;\n"
1692 " struct timespec curr;\n"
1693 " static struct timespec start;\n"
1694 "\\&\n"
1695 " if (first_call) {\n"
1696 " first_call = 0;\n"
1697 " if (clock_gettime(CLOCK_MONOTONIC, &start) == -1)\n"
1698 " err(EXIT_FAILURE, \"clock_gettime\");\n"
1699 " }\n"
1700 "\\&\n"
1701 " if (clock_gettime(CLOCK_MONOTONIC, &curr) == -1)\n"
1702 " err(EXIT_FAILURE, \"clock_gettime\");\n"
1703 "\\&\n"
1704 " secs = curr.tv_sec - start.tv_sec;\n"
1705 " nsecs = curr.tv_nsec - start.tv_nsec;\n"
1706 " if (nsecs E<lt> 0) {\n"
1707 " secs--;\n"
1708 " nsecs += 1000000000;\n"
1709 " }\n"
1710 " printf(\"%d.%03d: \", secs, (nsecs + 500000) / 1000000);\n"
1711 "}\n"
1712 "\\&\n"
1713 "int\n"
1714 "main(int argc, char *argv[])\n"
1715 "{\n"
1716 " int fd;\n"
1717 " ssize_t s;\n"
1718 " uint64_t exp, tot_exp, max_exp;\n"
1719 " struct timespec now;\n"
1720 " struct itimerspec new_value;\n"
1721 "\\&\n"
1722 " if (argc != 2 && argc != 4) {\n"
1723 " fprintf(stderr, \"%s init-secs [interval-secs max-exp]\\[rs]n\",\n"
1724 " argv[0]);\n"
1725 " exit(EXIT_FAILURE);\n"
1726 " }\n"
1727 "\\&\n"
1728 " if (clock_gettime(CLOCK_REALTIME, &now) == -1)\n"
1729 " err(EXIT_FAILURE, \"clock_gettime\");\n"
1730 "\\&\n"
1731 " /* Créer une minuterie absolue CLOCK_REALTIME avec une expiration\n"
1732 " et un intervalle initiaux comme spécifié en ligne de commande. */\n"
1733 "\\&\n"
1734 " new_value.it_value.tv_sec = now.tv_sec + atoi(argv[1]);\n"
1735 " new_value.it_value.tv_nsec = now.tv_nsec;\n"
1736 " if (argc == 2) {\n"
1737 " new_value.it_interval.tv_sec = 0;\n"
1738 " max_exp = 1;\n"
1739 " } else {\n"
1740 " new_value.it_interval.tv_sec = atoi(argv[2]);\n"
1741 " max_exp = atoi(argv[3]);\n"
1742 " }\n"
1743 " new_value.it_interval.tv_nsec = 0;\n"
1744 "\\&\n"
1745 " fd = timerfd_create(CLOCK_REALTIME, 0);\n"
1746 " if (fd == -1)\n"
1747 " err(EXIT_FAILURE, \"timerfd_create\");\n"
1748 "\\&\n"
1749 " if (timerfd_settime(fd, TFD_TIMER_ABSTIME, &new_value, NULL) == -1)\n"
1750 " err(EXIT_FAILURE, \"timerfd_settime\");\n"
1751 "\\&\n"
1752 " print_elapsed_time();\n"
1753 " printf(\"timer started\\[rs]n\");\n"
1754 "\\&\n"
1755 " for (tot_exp = 0; tot_exp E<lt> max_exp;) {\n"
1756 " s = read(fd, &exp, sizeof(uint64_t));\n"
1757 " if (s != sizeof(uint64_t))\n"
1758 " err(EXIT_FAILURE, \"read\");\n"
1759 "\\&\n"
1760 " tot_exp += exp;\n"
1761 " print_elapsed_time();\n"
1762 " printf(\"read: %\" PRIu64 \"; total=%\" PRIu64 \"\\[rs]n\", exp, tot_exp);\n"
1763 " }\n"
1764 "\\&\n"
1765 " exit(EXIT_SUCCESS);\n"
1766 "}\n"
1767
1768 #. type: TH
1769 #: fedora-44 fedora-rawhide
1770 #, no-wrap
1771 msgid "2024-07-23"
1772 msgstr "23 juillet 2024"
1773
1774 #. type: TH
1775 #: fedora-44 fedora-rawhide
1776 #, no-wrap
1777 msgid "Linux man-pages 6.13"
1778 msgstr "Pages du manuel de Linux 6.13"
1779
1780 #. type: TH
1781 #: mageia-cauldron
1782 #, no-wrap
1783 msgid "2026-02-08"
1784 msgstr "8 février 2026"
1785
1786 #. type: TH
1787 #: mageia-cauldron
1788 #, no-wrap
1789 msgid "Linux man-pages 6.17"
1790 msgstr "Pages du manuel de Linux 6.17"
1791
1792 #
1793 #
1794 #
1795 #
1796 #
1797 #
1798 #
1799 #. The commented out code here is what we currently need until
1800 #. the required stuff is in glibc
1801 #. /* Link with \-lrt */
1802 #. #define _GNU_SOURCE
1803 #. #include <sys/syscall.h>
1804 #. #include <unistd.h>
1805 #. #include <time.h>
1806 #. #if defined(__i386__)
1807 #. #define __NR_timerfd_create 322
1808 #. #define __NR_timerfd_settime 325
1809 #. #define __NR_timerfd_gettime 326
1810 #. #endif
1811 #. static int
1812 #. timerfd_create(int clockid, int flags)
1813 #. {
1814 #. return syscall(__NR_timerfd_create, clockid, flags);
1815 #. }
1816 #. static int
1817 #. timerfd_settime(int fd, int flags, struct itimerspec *new_value,
1818 #. struct itimerspec *curr_value)
1819 #. {
1820 #. return syscall(__NR_timerfd_settime, fd, flags, new_value,
1821 #. curr_value);
1822 #. }
1823 #. static int
1824 #. timerfd_gettime(int fd, struct itimerspec *curr_value)
1825 #. {
1826 #. return syscall(__NR_timerfd_gettime, fd, curr_value);
1827 #. }
1828 #. #define TFD_TIMER_ABSTIME (1 << 0)
1829 #. ////////////////////////////////////////////////////////////
1830 #. type: Plain text
1831 #: mageia-cauldron
1832 #, no-wrap
1833 msgid ""
1834 "#include E<lt>err.hE<gt>\n"
1835 "#include E<lt>inttypes.hE<gt>\n"
1836 "#include E<lt>stdio.hE<gt>\n"
1837 "#include E<lt>stdlib.hE<gt>\n"
1838 "#include E<lt>sys/timerfd.hE<gt>\n"
1839 "#include E<lt>sys/types.hE<gt>\n"
1840 "#include E<lt>time.hE<gt>\n"
1841 "#include E<lt>unistd.hE<gt>\n"
1842 "\\&\n"
1843 "static void\n"
1844 "print_elapsed_time(void)\n"
1845 "{\n"
1846 " int secs, nsecs;\n"
1847 " static int first_call = 1;\n"
1848 " struct timespec curr;\n"
1849 " static struct timespec start;\n"
1850 "\\&\n"
1851 " if (first_call) {\n"
1852 " first_call = 0;\n"
1853 " if (clock_gettime(CLOCK_MONOTONIC, &start) == -1)\n"
1854 " err(EXIT_FAILURE, \"clock_gettime\");\n"
1855 " }\n"
1856 "\\&\n"
1857 " if (clock_gettime(CLOCK_MONOTONIC, &curr) == -1)\n"
1858 " err(EXIT_FAILURE, \"clock_gettime\");\n"
1859 "\\&\n"
1860 " secs = curr.tv_sec - start.tv_sec;\n"
1861 " nsecs = curr.tv_nsec - start.tv_nsec;\n"
1862 " if (nsecs E<lt> 0) {\n"
1863 " secs--;\n"
1864 " nsecs += 1000000000;\n"
1865 " }\n"
1866 " printf(\"%d.%03d:\\[rs]t\", secs, (nsecs + 500000) / 1000000);\n"
1867 "}\n"
1868 "\\&\n"
1869 "int\n"
1870 "main(int argc, char *argv[])\n"
1871 "{\n"
1872 " int fd;\n"
1873 " ssize_t s;\n"
1874 " uint64_t expir, tot_expir, max_expir;\n"
1875 " struct timespec now;\n"
1876 " struct itimerspec new_value;\n"
1877 "\\&\n"
1878 " if (argc != 2 && argc != 4) {\n"
1879 " fprintf(stderr, \"%s init-secs [interval-secs max-num-expir]\\[rs]n\",\n"
1880 " argv[0]);\n"
1881 " exit(EXIT_FAILURE);\n"
1882 " }\n"
1883 "\\&\n"
1884 " if (clock_gettime(CLOCK_REALTIME, &now) == -1)\n"
1885 " err(EXIT_FAILURE, \"clock_gettime\");\n"
1886 "\\&\n"
1887 " /* Create a CLOCK_REALTIME absolute timer with initial\n"
1888 " expiration and interval as specified in command line. */\n"
1889 "\\&\n"
1890 " new_value.it_value.tv_sec = now.tv_sec + atoi(argv[1]);\n"
1891 " new_value.it_value.tv_nsec = now.tv_nsec;\n"
1892 " if (argc == 2) {\n"
1893 " new_value.it_interval.tv_sec = 0;\n"
1894 " max_expir = 1;\n"
1895 " } else {\n"
1896 " new_value.it_interval.tv_sec = atoi(argv[2]);\n"
1897 " max_expir = atoi(argv[3]);\n"
1898 " }\n"
1899 " new_value.it_interval.tv_nsec = 0;\n"
1900 "\\&\n"
1901 " fd = timerfd_create(CLOCK_REALTIME, 0);\n"
1902 " if (fd == -1)\n"
1903 " err(EXIT_FAILURE, \"timerfd_create\");\n"
1904 "\\&\n"
1905 " if (timerfd_settime(fd, TFD_TIMER_ABSTIME, &new_value, NULL) == -1)\n"
1906 " err(EXIT_FAILURE, \"timerfd_settime\");\n"
1907 "\\&\n"
1908 " print_elapsed_time();\n"
1909 " printf(\"timer started\\[rs]n\");\n"
1910 "\\&\n"
1911 " for (tot_expir = 0; tot_expir E<lt> max_expir;) {\n"
1912 " s = read(fd, &expir, sizeof(uint64_t));\n"
1913 " if (s != sizeof(uint64_t))\n"
1914 " err(EXIT_FAILURE, \"read\");\n"
1915 "\\&\n"
1916 " tot_expir += expir;\n"
1917 " print_elapsed_time();\n"
1918 " printf(\"read: %\" PRIu64 \"; total=%\" PRIu64 \"\\[rs]n\",\n"
1919 " expir, tot_expir);\n"
1920 " }\n"
1921 "\\&\n"
1922 " exit(EXIT_SUCCESS);\n"
1923 "}\n"
1924 msgstr ""
1925 "#include E<lt>err.hE<gt>\n"
1926 "#include E<lt>inttypes.hE<gt>\n"
1927 "#include E<lt>stdio.hE<gt>\n"
1928 "#include E<lt>stdlib.hE<gt>\n"
1929 "#include E<lt>sys/timerfd.hE<gt>\n"
1930 "#include E<lt>sys/types.hE<gt>\n"
1931 "#include E<lt>time.hE<gt>\n"
1932 "#include E<lt>unistd.hE<gt>\n"
1933 "\\&\n"
1934 "static void\n"
1935 "print_elapsed_time(void)\n"
1936 "{\n"
1937 " int secs, nsecs;\n"
1938 " static int first_call = 1;\n"
1939 " struct timespec curr;\n"
1940 " static struct timespec start;\n"
1941 "\\&\n"
1942 " if (first_call) {\n"
1943 " first_call = 0;\n"
1944 " if (clock_gettime(CLOCK_MONOTONIC, &start) == -1)\n"
1945 " err(EXIT_FAILURE, \"clock_gettime\");\n"
1946 " }\n"
1947 "\\&\n"
1948 " if (clock_gettime(CLOCK_MONOTONIC, &curr) == -1)\n"
1949 " err(EXIT_FAILURE, \"clock_gettime\");\n"
1950 "\\&\n"
1951 " secs = curr.tv_sec - start.tv_sec;\n"
1952 " nsecs = curr.tv_nsec - start.tv_nsec;\n"
1953 " if (nsecs E<lt> 0) {\n"
1954 " secs--;\n"
1955 " nsecs += 1000000000;\n"
1956 " }\n"
1957 " printf(\"%d.%03d:\\[rs]t\", secs, (nsecs + 500000) / 1000000);\n"
1958 "}\n"
1959 "\\&\n"
1960 "int\n"
1961 "main(int argc, char *argv[])\n"
1962 "{\n"
1963 " int fd;\n"
1964 " ssize_t s;\n"
1965 " uint64_t expir, tot_expir, max_expir;\n"
1966 " struct timespec now;\n"
1967 " struct itimerspec new_value;\n"
1968 "\\&\n"
1969 " if (argc != 2 && argc != 4) {\n"
1970 " fprintf(stderr, \"%s init-secs [interval-secs max-num-exp]\\[rs]n\",\n"
1971 " argv[0]);\n"
1972 " exit(EXIT_FAILURE);\n"
1973 " }\n"
1974 "\\&\n"
1975 " if (clock_gettime(CLOCK_REALTIME, &now) == -1)\n"
1976 " err(EXIT_FAILURE, \"clock_gettime\");\n"
1977 "\\&\n"
1978 " /* Créer une minuterie absolue CLOCK_REALTIME avec une expiration\n"
1979 " et un intervalle initiaux comme spécifié en ligne de commande. */\n"
1980 "\\&\n"
1981 " new_value.it_value.tv_sec = now.tv_sec + atoi(argv[1]);\n"
1982 " new_value.it_value.tv_nsec = now.tv_nsec;\n"
1983 " if (argc == 2) {\n"
1984 " new_value.it_interval.tv_sec = 0;\n"
1985 " max_expir = 1;\n"
1986 " } else {\n"
1987 " new_value.it_interval.tv_sec = atoi(argv[2]);\n"
1988 " max_expir = atoi(argv[3]);\n"
1989 " }\n"
1990 " new_value.it_interval.tv_nsec = 0;\n"
1991 "\\&\n"
1992 " fd = timerfd_create(CLOCK_REALTIME, 0);\n"
1993 " if (fd == -1)\n"
1994 " err(EXIT_FAILURE, \"timerfd_create\");\n"
1995 "\\&\n"
1996 " if (timerfd_settime(fd, TFD_TIMER_ABSTIME, &new_value, NULL) == -1)\n"
1997 " err(EXIT_FAILURE, \"timerfd_settime\");\n"
1998 "\\&\n"
1999 " print_elapsed_time();\n"
2000 " printf(\"timer started\\[rs]n\");\n"
2001 "\\&\n"
2002 " for (tot_expir = 0; tot_expir E<lt> max_expir;) {\n"
2003 " s = read(fd, &expir, sizeof(uint64_t));\n"
2004 " if (s != sizeof(uint64_t))\n"
2005 " err(EXIT_FAILURE, \"read\");\n"
2006 "\\&\n"
2007 " tot_expir += expir;\n"
2008 " print_elapsed_time();\n"
2009 " printf(\"read: %\" PRIu64 \"; total=%\" PRIu64 \"\\[rs]n\",\n"
2010 " expir, tot_expir);\n"
2011 " }\n"
2012 "\\&\n"
2013 " exit(EXIT_SUCCESS);\n"
2014 "}\n"
2015
2016 #. type: TH
2017 #: opensuse-leap-16-1 opensuse-tumbleweed
2018 #, no-wrap
2019 msgid "Linux man-pages (unreleased)"
2020 msgstr "Pages du manuel de Linux (non publiées)"