Debian Codegraph @

po/fr/man3/makecontext.3.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.
18 # Frédéric Hantrais <[email protected]>, 2013, 2014.
19 msgid ""
20 msgstr ""
21 "Project-Id-Version: manpages-l10n 4.22.0\n"
22 "POT-Creation-Date: 2026-06-05 06:30+0200\n"
23 "PO-Revision-Date: 2024-04-20 15:20+0200\n"
24 "Last-Translator: Jean-Pierre Giraud <[email protected]>\n"
25 "Language-Team: French <[email protected]>\n"
26 "Language: fr\n"
27 "MIME-Version: 1.0\n"
28 "Content-Type: text/plain; charset=UTF-8\n"
29 "Content-Transfer-Encoding: 8bit\n"
30 "Plural-Forms: nplurals=2; plural=n > 1;\n"
31 "X-Generator: Lokalize 22.12.3\n"
32
33 #. type: TH
34 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
35 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
36 #, no-wrap
37 msgid "makecontext"
38 msgstr "makecontext"
39
40 #. type: TH
41 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
42 #: opensuse-tumbleweed
43 #, no-wrap
44 msgid "2026-02-08"
45 msgstr "8 février 2026"
46
47 #. type: TH
48 #: archlinux debian-unstable
49 #, no-wrap
50 msgid "Linux man-pages 6.18"
51 msgstr "Pages du manuel de Linux 6.18"
52
53 #. type: SH
54 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
55 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
56 #, no-wrap
57 msgid "NAME"
58 msgstr "NOM"
59
60 #. type: Plain text
61 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
62 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
63 msgid "makecontext, swapcontext - manipulate user context"
64 msgstr "makecontext, swapcontext - Manipulation du contexte utilisateur"
65
66 #. type: SH
67 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
68 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
69 #, no-wrap
70 msgid "LIBRARY"
71 msgstr "BIBLIOTHÈQUE"
72
73 #. type: Plain text
74 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
75 #: opensuse-leap-16-1 opensuse-tumbleweed
76 msgid "Standard C library (I<libc>,\\ I<-lc>)"
77 msgstr "Bibliothèque C standard (I<libc>,\\ I<-lc>)"
78
79 #. type: SH
80 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
81 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
82 #, no-wrap
83 msgid "SYNOPSIS"
84 msgstr "SYNOPSIS"
85
86 #. type: Plain text
87 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
88 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
89 #, no-wrap
90 msgid "B<#include E<lt>ucontext.hE<gt>>\n"
91 msgstr "B<#include E<lt>ucontext.hE<gt>>\n"
92
93 #. type: Plain text
94 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
95 #: opensuse-leap-16-1 opensuse-tumbleweed
96 #, fuzzy, no-wrap
97 #| msgid ""
98 #| "B<void makecontext(ucontext_t *>I<ucp>B<, void (*>I<func>B<)(), int >I<argc>B<, ...);>\n"
99 #| "B<int swapcontext(ucontext_t *restrict >I<oucp>B<,>\n"
100 #| "B< const ucontext_t *restrict >I<ucp>B<);>\n"
101 msgid ""
102 "B<void makecontext(ucontext_t *>I<ucp>B<, typeof(void (int >I<arg0>B<, ...)) *>I<func>B<,>\n"
103 "B< int >I<argc>B<, ...);>\n"
104 "B<int swapcontext(ucontext_t *restrict >I<oucp>B<,>\n"
105 "B< const ucontext_t *restrict >I<ucp>B<);>\n"
106 msgstr ""
107 "B<void makecontext(ucontext_t *>I<ucp>B<, void (*>I<func>B<)(), int >I<argc>B<, ...);>\n"
108 "B<int swapcontext(ucontext_t *restrict >I<oucp>B<,>\n"
109 "B< const ucontext_t *restrict >I<ucp>B<);>\n"
110
111 #. type: SH
112 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
113 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
114 #, no-wrap
115 msgid "DESCRIPTION"
116 msgstr "DESCRIPTION"
117
118 #. type: Plain text
119 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
120 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
121 msgid ""
122 "In a System V-like environment, one has the type I<ucontext_t> (defined in "
123 "I<E<lt>ucontext.hE<gt>> and described in B<getcontext>(3)) and the four "
124 "functions B<getcontext>(3), B<setcontext>(3), B<makecontext>(), and "
125 "B<swapcontext>() that allow user-level context switching between multiple "
126 "threads of control within a process."
127 msgstr ""
128 "Dans un environnement de type System V, on dispose du type I<ucontext_t> "
129 "(défini dans I<E<lt>ucontext.hE<gt>> et décrit dansB<getcontext>(3)) et des "
130 "quatre fonctions B<getcontext>(3), B<setcontext>(2), B<makecontext>() et "
131 "B<swapcontext>() qui permettent, au niveau utilisateur, des permutations de "
132 "contextes entre plusieurs threads de contrôle au sein d'un processus."
133
134 #. type: Plain text
135 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
136 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
137 msgid ""
138 "The B<makecontext>() function modifies the context pointed to by I<ucp> "
139 "(which was obtained from a call to B<getcontext>(3)). Before invoking "
140 "B<makecontext>(), the caller must allocate a new stack for this context and "
141 "assign its address to I<ucp-E<gt>uc_stack>, and define a successor context "
142 "and assign its address to I<ucp-E<gt>uc_link>."
143 msgstr ""
144 "La fonction B<makecontext>() modifie le contexte pointé par I<ucp> (qui a "
145 "été obtenu par un appel à B<getcontext>(3)). Avant d'appeler "
146 "B<makecontext>(), l'appelant doit allouer une nouvelle pile pour ce contexte "
147 "et l'affecter à I<ucp-E<gt>uc_stack> et définir un contexte successeur et "
148 "l'affecter à I<ucp-E<gt>uc_link>."
149
150 #. type: Plain text
151 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
152 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
153 msgid ""
154 "When this context is later activated (using B<setcontext>(3) or "
155 "B<swapcontext>()) the function I<func> is called, and passed the series of "
156 "integer (I<int>) arguments that follow I<argc>; the caller must specify the "
157 "number of these arguments in I<argc>. When this function returns, the "
158 "successor context is activated. If the successor context pointer is NULL, "
159 "the thread exits."
160 msgstr ""
161 "Lorsque ce contexte est activé par la suite (avec B<setcontext>(3) ou "
162 "B<swapcontext>()), alors la fonction I<func>() est tout d'abord appelée avec "
163 "la série d'arguments de type I<int> spécifiés à la suite de I<argc>\\ ; "
164 "l'appelant doit préciser le nombre de ces arguments dans I<argc>. Lorsque "
165 "cette fonction s'achève, le contexte successeur est activé. Lorsque le "
166 "pointeur sur le contexte successeur vaut NULL, le thread se termine."
167
168 #. type: Plain text
169 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
170 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
171 msgid ""
172 "The B<swapcontext>() function saves the current context in the structure "
173 "pointed to by I<oucp>, and then activates the context pointed to by I<ucp>."
174 msgstr ""
175 "La fonction B<swapcontext>() sauvegarde le contexte actuel dans la structure "
176 "pointée par I<oucp> et active ensuite le contexte pointé par I<ucp>."
177
178 #. type: SH
179 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
180 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
181 #, no-wrap
182 msgid "RETURN VALUE"
183 msgstr "VALEUR RENVOYÉE"
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 ""
189 "When successful, B<swapcontext>() does not return. (But we may return "
190 "later, in case I<oucp> is activated, in which case it looks like "
191 "B<swapcontext>() returns 0.) On error, B<swapcontext>() returns -1 and "
192 "sets I<errno> to indicate the error."
193 msgstr ""
194 "En cas de succès, B<swapcontext>() ne rend pas la main à l'appelant (on peut "
195 "toutefois revenir à l'appelant en cas d'activation de I<oucp>\\ ; dans un "
196 "tel cas, B<swapcontext> se comporte comme si elle renvoyait B<0>). En cas "
197 "d'erreur, B<swapcontext>() renvoie B<-1> et définit I<errno> pour indiquer "
198 "l'erreur."
199
200 #. type: SH
201 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
202 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
203 #, no-wrap
204 msgid "ERRORS"
205 msgstr "ERREURS"
206
207 #. type: TP
208 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
209 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
210 #, no-wrap
211 msgid "B<ENOMEM>"
212 msgstr "B<ENOMEM>"
213
214 #. type: Plain text
215 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
216 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
217 msgid "Insufficient stack space left."
218 msgstr "Espace de pile disponible insuffisant."
219
220 #. type: SH
221 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
222 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
223 #, no-wrap
224 msgid "ATTRIBUTES"
225 msgstr "ATTRIBUTS"
226
227 #. type: Plain text
228 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
229 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
230 msgid ""
231 "For an explanation of the terms used in this section, see B<attributes>(7)."
232 msgstr ""
233 "Pour une explication des termes utilisés dans cette section, consulter "
234 "B<attributes>(7)."
235
236 #. type: tbl table
237 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
238 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
239 #, no-wrap
240 msgid "Interface"
241 msgstr "Interface"
242
243 #. type: tbl table
244 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
245 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
246 #, no-wrap
247 msgid "Attribute"
248 msgstr "Attribut"
249
250 #. type: tbl table
251 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
252 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
253 #, no-wrap
254 msgid "Value"
255 msgstr "Valeur"
256
257 #. type: tbl table
258 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
259 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
260 #, no-wrap
261 msgid ".na\n"
262 msgstr ".na\n"
263
264 #. type: tbl table
265 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
266 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
267 #, no-wrap
268 msgid ".nh\n"
269 msgstr ".nh\n"
270
271 #. type: tbl table
272 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
273 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
274 #, no-wrap
275 msgid "B<makecontext>()"
276 msgstr "B<makecontext>()"
277
278 #. type: tbl table
279 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
280 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
281 #, no-wrap
282 msgid "Thread safety"
283 msgstr "Sécurité des threads"
284
285 #. type: tbl table
286 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
287 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
288 #, no-wrap
289 msgid "MT-Safe race:ucp"
290 msgstr "MT-Safe race:ucp"
291
292 #. type: tbl table
293 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
294 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
295 #, no-wrap
296 msgid "B<swapcontext>()"
297 msgstr "B<swapcontext>()"
298
299 #. type: tbl table
300 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
301 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
302 #, no-wrap
303 msgid "MT-Safe race:oucp race:ucp"
304 msgstr "MT-Safe race:oucp race:ucp"
305
306 #. type: SH
307 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
308 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
309 #, no-wrap
310 msgid "STANDARDS"
311 msgstr "NORMES"
312
313 #. type: Plain text
314 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
315 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
316 msgid "None."
317 msgstr "Aucun."
318
319 #. type: SH
320 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
321 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
322 #, no-wrap
323 msgid "HISTORY"
324 msgstr "HISTORIQUE"
325
326 #. type: Plain text
327 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
328 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
329 msgid ""
330 "glibc 2.1. SUSv2, POSIX.1-2001. Removed in POSIX.1-2008, citing "
331 "portability issues, and recommending that applications be rewritten to use "
332 "POSIX threads instead."
333 msgstr ""
334 "glibc 2.1. SUSv2, POSIX.1-2001. Supprimée dans POSIX.1-2008 à cause de "
335 "problèmes de portabilité, et recommande que les applications soient "
336 "réécrites avec des processus légers POSIX à la place."
337
338 #. type: SH
339 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
340 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
341 #, no-wrap
342 msgid "NOTES"
343 msgstr "NOTES"
344
345 #. type: Plain text
346 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
347 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
348 msgid ""
349 "The interpretation of I<ucp-E<gt>uc_stack> is just as in B<sigaltstack>(2), "
350 "namely, this struct contains the start and length of a memory area to be "
351 "used as the stack, regardless of the direction of growth of the stack. "
352 "Thus, it is not necessary for the user program to worry about this direction."
353 msgstr ""
354 "L'interprétation de I<ucp-E<gt>uc_stack> est exactement la même que pour "
355 "B<sigaltstack>(2), à savoir, cette structure contient l'adresse de départ et "
356 "la longueur d'une zone mémoire destinée à être utilisée comme pile, et ce, "
357 "sans considération sur le sens d'expansion de la pile. Il n'est donc pas "
358 "nécessaire pour le programme utilisateur de se soucier de ce sens."
359
360 #. type: Plain text
361 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
362 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
363 msgid ""
364 "On architectures where I<int> and pointer types are the same size (e.g., "
365 "x86-32, where both types are 32 bits), you may be able to get away with "
366 "passing pointers as arguments to B<makecontext>() following I<argc>. "
367 "However, doing this is not guaranteed to be portable, is undefined according "
368 "to the standards, and won't work on architectures where pointers are larger "
369 "than I<int>s. Nevertheless, starting with glibc 2.8, glibc makes some "
370 "changes to B<makecontext>(), to permit this on some 64-bit architectures "
371 "(e.g., x86-64)."
372 msgstr ""
373 "Sur les architectures où le type I<int> et les types « pointeur » sont de "
374 "même taille (par exemple, pour x86-32, leur taille est de 32\\ bits), vous "
375 "pouvez passer outre en passant des pointeurs comme paramètres à "
376 "B<makecontext>() suivi de I<argc>. Cependant, sachez que cela n'est pas "
377 "forcément portable, et indéfini selon les standards, et ne fonctionnera pas "
378 "sur les architectures où la taille des pointeurs est supérieure à la taille "
379 "des entiers I<int>. Néanmoins, avec la glibc\\ 2.8, la glibc a effectué "
380 "quelques changements à B<makecontext>(), afin de permettre cela sur "
381 "certaines architectures 64\\ bits (par exemple, x86-64)."
382
383 #. type: SH
384 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
385 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
386 #, no-wrap
387 msgid "EXAMPLES"
388 msgstr "EXEMPLES"
389
390 #. type: Plain text
391 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
392 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
393 msgid ""
394 "The example program below demonstrates the use of B<getcontext>(3), "
395 "B<makecontext>(), and B<swapcontext>(). Running the program produces the "
396 "following output:"
397 msgstr ""
398 "Le programme d'exemple ci-dessous décrit l'utilisation de B<getcontext>(3), "
399 "B<makecontext>() et B<swapcontext>(). Ce programme produit la sortie "
400 "suivante\\ :"
401
402 #. type: Plain text
403 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
404 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
405 #, no-wrap
406 msgid ""
407 "$B< ./a.out>\n"
408 "main: swapcontext(&uctx_main, &uctx_func2)\n"
409 "func2: started\n"
410 "func2: swapcontext(&uctx_func2, &uctx_func1)\n"
411 "func1: started\n"
412 "func1: swapcontext(&uctx_func1, &uctx_func2)\n"
413 "func2: returning\n"
414 "func1: returning\n"
415 "main: exiting\n"
416 msgstr ""
417 "$B< ./a.out>\n"
418 "main: swapcontext(&uctx_main, &uctx_func2)\n"
419 "func2: démarré\n"
420 "func2: swapcontext(&uctx_func2, &uctx_func1)\n"
421 "func1: démarré\n"
422 "func1: swapcontext(&uctx_func1, &uctx_func2)\n"
423 "func2: retour\n"
424 "func1: retour\n"
425 "main: quitte\n"
426
427 #. type: SS
428 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
429 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
430 #, no-wrap
431 msgid "Program source"
432 msgstr "Source du programme"
433
434 #. type: Plain text
435 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
436 #: opensuse-tumbleweed
437 #, fuzzy, no-wrap
438 #| msgid ""
439 #| "#include E<lt>stdio.hE<gt>\n"
440 #| "#include E<lt>stdlib.hE<gt>\n"
441 #| "#include E<lt>ucontext.hE<gt>\n"
442 #| "\\&\n"
443 #| "static ucontext_t uctx_main, uctx_func1, uctx_func2;\n"
444 #| "\\&\n"
445 #| "#define handle_error(msg) \\e\n"
446 #| " do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
447 #| "\\&\n"
448 #| "static void\n"
449 #| "func1(void)\n"
450 #| "{\n"
451 #| " printf(\"%s: started\\en\", __func__);\n"
452 #| " printf(\"%s: swapcontext(&uctx_func1, &uctx_func2)\\en\", __func__);\n"
453 #| " if (swapcontext(&uctx_func1, &uctx_func2) == -1)\n"
454 #| " handle_error(\"swapcontext\");\n"
455 #| " printf(\"%s: returning\\en\", __func__);\n"
456 #| "}\n"
457 #| "\\&\n"
458 #| "static void\n"
459 #| "func2(void)\n"
460 #| "{\n"
461 #| " printf(\"%s: started\\en\", __func__);\n"
462 #| " printf(\"%s: swapcontext(&uctx_func2, &uctx_func1)\\en\", __func__);\n"
463 #| " if (swapcontext(&uctx_func2, &uctx_func1) == -1)\n"
464 #| " handle_error(\"swapcontext\");\n"
465 #| " printf(\"%s: returning\\en\", __func__);\n"
466 #| "}\n"
467 #| "\\&\n"
468 #| "int\n"
469 #| "main(int argc, char *argv[])\n"
470 #| "{\n"
471 #| " char func1_stack[16384];\n"
472 #| " char func2_stack[16384];\n"
473 #| "\\&\n"
474 #| " if (getcontext(&uctx_func1) == -1)\n"
475 #| " handle_error(\"getcontext\");\n"
476 #| " uctx_func1.uc_stack.ss_sp = func1_stack;\n"
477 #| " uctx_func1.uc_stack.ss_size = sizeof(func1_stack);\n"
478 #| " uctx_func1.uc_link = &uctx_main;\n"
479 #| " makecontext(&uctx_func1, func1, 0);\n"
480 #| "\\&\n"
481 #| " if (getcontext(&uctx_func2) == -1)\n"
482 #| " handle_error(\"getcontext\");\n"
483 #| " uctx_func2.uc_stack.ss_sp = func2_stack;\n"
484 #| " uctx_func2.uc_stack.ss_size = sizeof(func2_stack);\n"
485 #| " /* Successor context is f1(), unless argc E<gt> 1 */\n"
486 #| " uctx_func2.uc_link = (argc E<gt> 1) ? NULL : &uctx_func1;\n"
487 #| " makecontext(&uctx_func2, func2, 0);\n"
488 #| "\\&\n"
489 #| " printf(\"%s: swapcontext(&uctx_main, &uctx_func2)\\en\", __func__);\n"
490 #| " if (swapcontext(&uctx_main, &uctx_func2) == -1)\n"
491 #| " handle_error(\"swapcontext\");\n"
492 #| "\\&\n"
493 #| " printf(\"%s: exiting\\en\", __func__);\n"
494 #| " exit(EXIT_SUCCESS);\n"
495 #| "}\n"
496 msgid ""
497 "#include E<lt>err.hE<gt>\n"
498 "#include E<lt>stdio.hE<gt>\n"
499 "#include E<lt>stdlib.hE<gt>\n"
500 "#include E<lt>ucontext.hE<gt>\n"
501 "\\&\n"
502 "static ucontext_t uctx_main, uctx_func1, uctx_func2;\n"
503 "\\&\n"
504 "static void\n"
505 "func1(void)\n"
506 "{\n"
507 " printf(\"%s: started\\[rs]n\", __func__);\n"
508 " printf(\"%s: swapcontext(&uctx_func1, &uctx_func2)\\[rs]n\", __func__);\n"
509 " if (swapcontext(&uctx_func1, &uctx_func2) == -1)\n"
510 " err(EXIT_FAILURE, \"swapcontext\");\n"
511 " printf(\"%s: returning\\[rs]n\", __func__);\n"
512 "}\n"
513 "\\&\n"
514 "static void\n"
515 "func2(void)\n"
516 "{\n"
517 " printf(\"%s: started\\[rs]n\", __func__);\n"
518 " printf(\"%s: swapcontext(&uctx_func2, &uctx_func1)\\[rs]n\", __func__);\n"
519 " if (swapcontext(&uctx_func2, &uctx_func1) == -1)\n"
520 " err(EXIT_FAILURE, \"swapcontext\");\n"
521 " printf(\"%s: returning\\[rs]n\", __func__);\n"
522 "}\n"
523 "\\&\n"
524 "int\n"
525 "main(int argc, char *argv[])\n"
526 "{\n"
527 " char func1_stack[16384];\n"
528 " char func2_stack[16384];\n"
529 "\\&\n"
530 " if (getcontext(&uctx_func1) == -1)\n"
531 " err(EXIT_FAILURE, \"getcontext\");\n"
532 " uctx_func1.uc_stack.ss_sp = func1_stack;\n"
533 " uctx_func1.uc_stack.ss_size = sizeof(func1_stack);\n"
534 " uctx_func1.uc_link = &uctx_main;\n"
535 " makecontext(&uctx_func1, func1, 0);\n"
536 "\\&\n"
537 " if (getcontext(&uctx_func2) == -1)\n"
538 " err(EXIT_FAILURE, \"getcontext\");\n"
539 " uctx_func2.uc_stack.ss_sp = func2_stack;\n"
540 " uctx_func2.uc_stack.ss_size = sizeof(func2_stack);\n"
541 " /* Successor context is f1(), unless argc E<gt> 1 */\n"
542 " uctx_func2.uc_link = (argc E<gt> 1) ? NULL : &uctx_func1;\n"
543 " makecontext(&uctx_func2, func2, 0);\n"
544 "\\&\n"
545 " printf(\"%s: swapcontext(&uctx_main, &uctx_func2)\\[rs]n\", __func__);\n"
546 " if (swapcontext(&uctx_main, &uctx_func2) == -1)\n"
547 " err(EXIT_FAILURE, \"swapcontext\");\n"
548 "\\&\n"
549 " printf(\"%s: exiting\\[rs]n\", __func__);\n"
550 " exit(EXIT_SUCCESS);\n"
551 "}\n"
552 msgstr ""
553 "#include E<lt>stdio.hE<gt>\n"
554 "#include E<lt>stdlib.hE<gt>\n"
555 "#include E<lt>ucontext.hE<gt>\n"
556 "\\&\n"
557 "static ucontext_t uctx_main, uctx_func1, uctx_func2;\n"
558 "\\&\n"
559 "#define handle_error(msg) \\e\n"
560 " do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
561 "\\&\n"
562 "static void\n"
563 "func1(void)\n"
564 "{\n"
565 " printf(\"%s: démarré\\en\", __func__);\n"
566 " printf(\"%s: swapcontext(&uctx_func1, &uctx_func2)\\en\", __func__);\n"
567 " if (swapcontext(&uctx_func1, &uctx_func2) == -1)\n"
568 " handle_error(\"swapcontext\");\n"
569 " printf(\"%s: retour\\en\", __func__);\n"
570 "}\n"
571 "\\&\n"
572 "static void\n"
573 "func2(void)\n"
574 "{\n"
575 " printf(\"%s: démarré\\en\", __func__);\n"
576 " printf(\"%s: swapcontext(&uctx_func2, &uctx_func1)\\en\", __func__);\n"
577 " if (swapcontext(&uctx_func2, &uctx_func1) == -1)\n"
578 " handle_error(\"swapcontext\");\n"
579 " printf(\"%s: retour\\en\", __func__);\n"
580 "}\n"
581 "\\&\n"
582 "int\n"
583 "main(int argc, char *argv[])\n"
584 "{\n"
585 " char func1_stack[16384];\n"
586 " char func2_stack[16384];\n"
587 "\\&\n"
588 " if (getcontext(&uctx_func1) == -1)\n"
589 " handle_error(\"getcontext\");\n"
590 " uctx_func1.uc_stack.ss_sp = func1_stack;\n"
591 " uctx_func1.uc_stack.ss_size = sizeof(func1_stack);\n"
592 " uctx_func1.uc_link = &uctx_main;\n"
593 " makecontext(&uctx_func1, func1, 0);\n"
594 "\\&\n"
595 " if (getcontext(&uctx_func2) == -1)\n"
596 " handle_error(\"getcontext\");\n"
597 " uctx_func2.uc_stack.ss_sp = func2_stack;\n"
598 " uctx_func2.uc_stack.ss_size = sizeof(func2_stack);\n"
599 " /* Le contexte successeur est f1(), unless argc E<gt> 1 */\n"
600 " uctx_func2.uc_link = (argc E<gt> 1) ? NULL : &uctx_func1;\n"
601 " makecontext(&uctx_func2, func2, 0);\n"
602 "\\&\n"
603 " printf(\"%s: swapcontext(&uctx_main, &uctx_func2)\\en\", __func__);\n"
604 " if (swapcontext(&uctx_main, &uctx_func2) == -1)\n"
605 " handle_error(\"swapcontext\");\n"
606 "\\&\n"
607 " printf(\"%s: quitte\\en\", __func__);\n"
608 " exit(EXIT_SUCCESS);\n"
609 "}\n"
610
611 #. SRC END
612 #. type: SH
613 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
614 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
615 #, no-wrap
616 msgid "SEE ALSO"
617 msgstr "VOIR AUSSI"
618
619 #. type: Plain text
620 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
621 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
622 msgid ""
623 "B<sigaction>(2), B<sigaltstack>(2), B<sigprocmask>(2), B<getcontext>(3), "
624 "B<sigsetjmp>(3)"
625 msgstr ""
626 "B<sigaction>(2), B<sigaltstack>(2), B<sigprocmask>(2), B<getcontext>(3), "
627 "B<sigsetjmp>(3)"
628
629 #. type: TH
630 #: debian-trixie
631 #, no-wrap
632 msgid "2024-06-15"
633 msgstr "15 juin 2024"
634
635 #. type: TH
636 #: debian-trixie
637 #, no-wrap
638 msgid "Linux man-pages 6.9.1"
639 msgstr "Pages du manuel de Linux 6.9.1"
640
641 #. type: Plain text
642 #: debian-trixie
643 msgid "Standard C library (I<libc>, I<-lc>)"
644 msgstr "Bibliothèque C standard (I<libc>, I<-lc>)"
645
646 #. type: Plain text
647 #: debian-trixie
648 #, no-wrap
649 msgid ""
650 "B<void makecontext(ucontext_t *>I<ucp>B<, void (*>I<func>B<)(), int >I<argc>B<, ...);>\n"
651 "B<int swapcontext(ucontext_t *restrict >I<oucp>B<,>\n"
652 "B< const ucontext_t *restrict >I<ucp>B<);>\n"
653 msgstr ""
654 "B<void makecontext(ucontext_t *>I<ucp>B<, void (*>I<func>B<)(), int >I<argc>B<, ...);>\n"
655 "B<int swapcontext(ucontext_t *restrict >I<oucp>B<,>\n"
656 "B< const ucontext_t *restrict >I<ucp>B<);>\n"
657
658 #. type: Plain text
659 #: debian-trixie fedora-44 fedora-rawhide
660 #, fuzzy, no-wrap
661 #| msgid ""
662 #| "#include E<lt>stdio.hE<gt>\n"
663 #| "#include E<lt>stdlib.hE<gt>\n"
664 #| "#include E<lt>ucontext.hE<gt>\n"
665 #| "\\&\n"
666 #| "static ucontext_t uctx_main, uctx_func1, uctx_func2;\n"
667 #| "\\&\n"
668 #| "#define handle_error(msg) \\e\n"
669 #| " do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
670 #| "\\&\n"
671 #| "static void\n"
672 #| "func1(void)\n"
673 #| "{\n"
674 #| " printf(\"%s: started\\en\", __func__);\n"
675 #| " printf(\"%s: swapcontext(&uctx_func1, &uctx_func2)\\en\", __func__);\n"
676 #| " if (swapcontext(&uctx_func1, &uctx_func2) == -1)\n"
677 #| " handle_error(\"swapcontext\");\n"
678 #| " printf(\"%s: returning\\en\", __func__);\n"
679 #| "}\n"
680 #| "\\&\n"
681 #| "static void\n"
682 #| "func2(void)\n"
683 #| "{\n"
684 #| " printf(\"%s: started\\en\", __func__);\n"
685 #| " printf(\"%s: swapcontext(&uctx_func2, &uctx_func1)\\en\", __func__);\n"
686 #| " if (swapcontext(&uctx_func2, &uctx_func1) == -1)\n"
687 #| " handle_error(\"swapcontext\");\n"
688 #| " printf(\"%s: returning\\en\", __func__);\n"
689 #| "}\n"
690 #| "\\&\n"
691 #| "int\n"
692 #| "main(int argc, char *argv[])\n"
693 #| "{\n"
694 #| " char func1_stack[16384];\n"
695 #| " char func2_stack[16384];\n"
696 #| "\\&\n"
697 #| " if (getcontext(&uctx_func1) == -1)\n"
698 #| " handle_error(\"getcontext\");\n"
699 #| " uctx_func1.uc_stack.ss_sp = func1_stack;\n"
700 #| " uctx_func1.uc_stack.ss_size = sizeof(func1_stack);\n"
701 #| " uctx_func1.uc_link = &uctx_main;\n"
702 #| " makecontext(&uctx_func1, func1, 0);\n"
703 #| "\\&\n"
704 #| " if (getcontext(&uctx_func2) == -1)\n"
705 #| " handle_error(\"getcontext\");\n"
706 #| " uctx_func2.uc_stack.ss_sp = func2_stack;\n"
707 #| " uctx_func2.uc_stack.ss_size = sizeof(func2_stack);\n"
708 #| " /* Successor context is f1(), unless argc E<gt> 1 */\n"
709 #| " uctx_func2.uc_link = (argc E<gt> 1) ? NULL : &uctx_func1;\n"
710 #| " makecontext(&uctx_func2, func2, 0);\n"
711 #| "\\&\n"
712 #| " printf(\"%s: swapcontext(&uctx_main, &uctx_func2)\\en\", __func__);\n"
713 #| " if (swapcontext(&uctx_main, &uctx_func2) == -1)\n"
714 #| " handle_error(\"swapcontext\");\n"
715 #| "\\&\n"
716 #| " printf(\"%s: exiting\\en\", __func__);\n"
717 #| " exit(EXIT_SUCCESS);\n"
718 #| "}\n"
719 msgid ""
720 "#include E<lt>stdio.hE<gt>\n"
721 "#include E<lt>stdlib.hE<gt>\n"
722 "#include E<lt>ucontext.hE<gt>\n"
723 "\\&\n"
724 "static ucontext_t uctx_main, uctx_func1, uctx_func2;\n"
725 "\\&\n"
726 "#define handle_error(msg) \\[rs]\n"
727 " do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
728 "\\&\n"
729 "static void\n"
730 "func1(void)\n"
731 "{\n"
732 " printf(\"%s: started\\[rs]n\", __func__);\n"
733 " printf(\"%s: swapcontext(&uctx_func1, &uctx_func2)\\[rs]n\", __func__);\n"
734 " if (swapcontext(&uctx_func1, &uctx_func2) == -1)\n"
735 " handle_error(\"swapcontext\");\n"
736 " printf(\"%s: returning\\[rs]n\", __func__);\n"
737 "}\n"
738 "\\&\n"
739 "static void\n"
740 "func2(void)\n"
741 "{\n"
742 " printf(\"%s: started\\[rs]n\", __func__);\n"
743 " printf(\"%s: swapcontext(&uctx_func2, &uctx_func1)\\[rs]n\", __func__);\n"
744 " if (swapcontext(&uctx_func2, &uctx_func1) == -1)\n"
745 " handle_error(\"swapcontext\");\n"
746 " printf(\"%s: returning\\[rs]n\", __func__);\n"
747 "}\n"
748 "\\&\n"
749 "int\n"
750 "main(int argc, char *argv[])\n"
751 "{\n"
752 " char func1_stack[16384];\n"
753 " char func2_stack[16384];\n"
754 "\\&\n"
755 " if (getcontext(&uctx_func1) == -1)\n"
756 " handle_error(\"getcontext\");\n"
757 " uctx_func1.uc_stack.ss_sp = func1_stack;\n"
758 " uctx_func1.uc_stack.ss_size = sizeof(func1_stack);\n"
759 " uctx_func1.uc_link = &uctx_main;\n"
760 " makecontext(&uctx_func1, func1, 0);\n"
761 "\\&\n"
762 " if (getcontext(&uctx_func2) == -1)\n"
763 " handle_error(\"getcontext\");\n"
764 " uctx_func2.uc_stack.ss_sp = func2_stack;\n"
765 " uctx_func2.uc_stack.ss_size = sizeof(func2_stack);\n"
766 " /* Successor context is f1(), unless argc E<gt> 1 */\n"
767 " uctx_func2.uc_link = (argc E<gt> 1) ? NULL : &uctx_func1;\n"
768 " makecontext(&uctx_func2, func2, 0);\n"
769 "\\&\n"
770 " printf(\"%s: swapcontext(&uctx_main, &uctx_func2)\\[rs]n\", __func__);\n"
771 " if (swapcontext(&uctx_main, &uctx_func2) == -1)\n"
772 " handle_error(\"swapcontext\");\n"
773 "\\&\n"
774 " printf(\"%s: exiting\\[rs]n\", __func__);\n"
775 " exit(EXIT_SUCCESS);\n"
776 "}\n"
777 msgstr ""
778 "#include E<lt>stdio.hE<gt>\n"
779 "#include E<lt>stdlib.hE<gt>\n"
780 "#include E<lt>ucontext.hE<gt>\n"
781 "\\&\n"
782 "static ucontext_t uctx_main, uctx_func1, uctx_func2;\n"
783 "\\&\n"
784 "#define handle_error(msg) \\e\n"
785 " do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
786 "\\&\n"
787 "static void\n"
788 "func1(void)\n"
789 "{\n"
790 " printf(\"%s: démarré\\en\", __func__);\n"
791 " printf(\"%s: swapcontext(&uctx_func1, &uctx_func2)\\en\", __func__);\n"
792 " if (swapcontext(&uctx_func1, &uctx_func2) == -1)\n"
793 " handle_error(\"swapcontext\");\n"
794 " printf(\"%s: retour\\en\", __func__);\n"
795 "}\n"
796 "\\&\n"
797 "static void\n"
798 "func2(void)\n"
799 "{\n"
800 " printf(\"%s: démarré\\en\", __func__);\n"
801 " printf(\"%s: swapcontext(&uctx_func2, &uctx_func1)\\en\", __func__);\n"
802 " if (swapcontext(&uctx_func2, &uctx_func1) == -1)\n"
803 " handle_error(\"swapcontext\");\n"
804 " printf(\"%s: retour\\en\", __func__);\n"
805 "}\n"
806 "\\&\n"
807 "int\n"
808 "main(int argc, char *argv[])\n"
809 "{\n"
810 " char func1_stack[16384];\n"
811 " char func2_stack[16384];\n"
812 "\\&\n"
813 " if (getcontext(&uctx_func1) == -1)\n"
814 " handle_error(\"getcontext\");\n"
815 " uctx_func1.uc_stack.ss_sp = func1_stack;\n"
816 " uctx_func1.uc_stack.ss_size = sizeof(func1_stack);\n"
817 " uctx_func1.uc_link = &uctx_main;\n"
818 " makecontext(&uctx_func1, func1, 0);\n"
819 "\\&\n"
820 " if (getcontext(&uctx_func2) == -1)\n"
821 " handle_error(\"getcontext\");\n"
822 " uctx_func2.uc_stack.ss_sp = func2_stack;\n"
823 " uctx_func2.uc_stack.ss_size = sizeof(func2_stack);\n"
824 " /* Le contexte successeur est f1(), unless argc E<gt> 1 */\n"
825 " uctx_func2.uc_link = (argc E<gt> 1) ? NULL : &uctx_func1;\n"
826 " makecontext(&uctx_func2, func2, 0);\n"
827 "\\&\n"
828 " printf(\"%s: swapcontext(&uctx_main, &uctx_func2)\\en\", __func__);\n"
829 " if (swapcontext(&uctx_main, &uctx_func2) == -1)\n"
830 " handle_error(\"swapcontext\");\n"
831 "\\&\n"
832 " printf(\"%s: quitte\\en\", __func__);\n"
833 " exit(EXIT_SUCCESS);\n"
834 "}\n"
835
836 #. type: TH
837 #: fedora-44 fedora-rawhide
838 #, no-wrap
839 msgid "2024-12-13"
840 msgstr "13 décembre 2024"
841
842 #. type: TH
843 #: fedora-44 fedora-rawhide
844 #, no-wrap
845 msgid "Linux man-pages 6.13"
846 msgstr "Pages du manuel de Linux 6.13"
847
848 #. type: TH
849 #: mageia-cauldron
850 #, no-wrap
851 msgid "Linux man-pages 6.17"
852 msgstr "Pages du manuel de Linux 6.17"
853
854 #. type: TH
855 #: opensuse-leap-16-1 opensuse-tumbleweed
856 #, no-wrap
857 msgid "Linux man-pages (unreleased)"
858 msgstr "Pages du manuel de Linux (non publiées)"