Debian Codegraph @

po/es/man3/makecontext.3.po

raw
1 # Spanish translation of manpages
2 # This file is distributed under the same license as the manpages-l10n package.
3 # Copyright © of this file:
4 # Miguel Pérez Ibars <[email protected]>, 2004.
5 msgid ""
6 msgstr ""
7 "Project-Id-Version: manpages-l10n\n"
8 "POT-Creation-Date: 2026-06-05 06:30+0200\n"
9 "PO-Revision-Date: 2021-01-30 15:32+0100\n"
10 "Last-Translator: Miguel Pérez Ibars <[email protected]>\n"
11 "Language-Team: Spanish <[email protected]>\n"
12 "Language: es\n"
13 "MIME-Version: 1.0\n"
14 "Content-Type: text/plain; charset=UTF-8\n"
15 "Content-Transfer-Encoding: 8bit\n"
16 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
17 "X-Generator: Lokalize 20.04.1\n"
18
19 #. type: TH
20 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
21 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
22 #, fuzzy, no-wrap
23 #| msgid "B<makecontext>()"
24 msgid "makecontext"
25 msgstr "B<makecontext>()"
26
27 #. type: TH
28 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
29 #: opensuse-tumbleweed
30 #, no-wrap
31 msgid "2026-02-08"
32 msgstr "8 Febrero 2026"
33
34 #. type: TH
35 #: archlinux debian-unstable
36 #, fuzzy, no-wrap
37 #| msgid "Linux man-pages 6.17"
38 msgid "Linux man-pages 6.18"
39 msgstr "Páginas de Manual de Linux 6.17"
40
41 #. type: SH
42 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
43 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
44 #, no-wrap
45 msgid "NAME"
46 msgstr "NOMBRE"
47
48 #. type: Plain text
49 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
50 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
51 msgid "makecontext, swapcontext - manipulate user context"
52 msgstr "makecontext, swapcontext - manipulan el contexto de usuario"
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 "LIBRARY"
59 msgstr "BIBLIOTECA"
60
61 #. type: Plain text
62 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
63 #: opensuse-leap-16-1 opensuse-tumbleweed
64 msgid "Standard C library (I<libc>,\\ I<-lc>)"
65 msgstr "Biblioteca Estándar C (I<libc>,\\ I<-lc>)"
66
67 #. type: SH
68 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
69 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
70 #, no-wrap
71 msgid "SYNOPSIS"
72 msgstr "SINOPSIS"
73
74 #. type: Plain text
75 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
76 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
77 #, no-wrap
78 msgid "B<#include E<lt>ucontext.hE<gt>>\n"
79 msgstr "B<#include E<lt>ucontext.hE<gt>>\n"
80
81 #. type: Plain text
82 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
83 #: opensuse-leap-16-1 opensuse-tumbleweed
84 #, fuzzy, no-wrap
85 #| msgid "B<void makecontext(ucontext_t *>I<ucp>B<, void (*>I<func>B<)(),> B<int >I<argc>B<, ...);>"
86 msgid ""
87 "B<void makecontext(ucontext_t *>I<ucp>B<, typeof(void (int >I<arg0>B<, ...)) *>I<func>B<,>\n"
88 "B< int >I<argc>B<, ...);>\n"
89 "B<int swapcontext(ucontext_t *restrict >I<oucp>B<,>\n"
90 "B< const ucontext_t *restrict >I<ucp>B<);>\n"
91 msgstr "B<void makecontext(ucontext_t *>I<ucp>B<, void (*>I<func>B<)(),> B<int >I<argc>B<, ...);>"
92
93 #. type: SH
94 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
95 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
96 #, no-wrap
97 msgid "DESCRIPTION"
98 msgstr "DESCRIPCIÓN"
99
100 #. type: Plain text
101 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
102 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
103 #, fuzzy
104 #| msgid ""
105 #| "In a SysV-like environment, one has the type B<ucontext_t> defined in "
106 #| "I<E<lt>ucontext.hE<gt>> and the four functions B<getcontext()>, "
107 #| "B<setcontext()>, B<makecontext()> and B<swapcontext()> that allow user-"
108 #| "level context switching between multiple threads of control within a "
109 #| "process."
110 msgid ""
111 "In a System V-like environment, one has the type I<ucontext_t> (defined in "
112 "I<E<lt>ucontext.hE<gt>> and described in B<getcontext>(3)) and the four "
113 "functions B<getcontext>(3), B<setcontext>(3), B<makecontext>(), and "
114 "B<swapcontext>() that allow user-level context switching between multiple "
115 "threads of control within a process."
116 msgstr ""
117 "En un entorno tipo SysV, se definen el tipo B<ucontext_t> en "
118 "I<E<lt>ucontext.hE<gt>> y las cuatro funciones B<getcontext()>, "
119 "B<setcontext()>, B<makecontext()> y B<swapcontext()> que permiten la "
120 "conmutación del contexto del nivel de usuario entre múltiples hilos de "
121 "control dentro de un proceso."
122
123 #. type: Plain text
124 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
125 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
126 msgid ""
127 "The B<makecontext>() function modifies the context pointed to by I<ucp> "
128 "(which was obtained from a call to B<getcontext>(3)). Before invoking "
129 "B<makecontext>(), the caller must allocate a new stack for this context and "
130 "assign its address to I<ucp-E<gt>uc_stack>, and define a successor context "
131 "and assign its address to I<ucp-E<gt>uc_link>."
132 msgstr ""
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 "When this context is later activated (using B<setcontext>(3) or "
139 "B<swapcontext>()) the function I<func> is called, and passed the series of "
140 "integer (I<int>) arguments that follow I<argc>; the caller must specify the "
141 "number of these arguments in I<argc>. When this function returns, the "
142 "successor context is activated. If the successor context pointer is NULL, "
143 "the thread exits."
144 msgstr ""
145
146 #. type: Plain text
147 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
148 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
149 msgid ""
150 "The B<swapcontext>() function saves the current context in the structure "
151 "pointed to by I<oucp>, and then activates the context pointed to by I<ucp>."
152 msgstr ""
153 "La función B<swapcontext>() salva el contexto actual en la estructura "
154 "apuntada por I<oucp>, y activa el contexto apuntado por I<ucp>."
155
156 #. type: SH
157 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
158 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
159 #, no-wrap
160 msgid "RETURN VALUE"
161 msgstr "VALOR DEVUELTO"
162
163 #. type: Plain text
164 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
165 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
166 #, fuzzy
167 #| msgid ""
168 #| "When successful, B<makecontext()> returns 0 and B<swapcontext()> does not "
169 #| "return. (But we may return later, in case I<oucp> is activated, in which "
170 #| "case it looks like B<swapcontext()> returns 0.) On error, both return -1 "
171 #| "and set I<errno> appropriately."
172 msgid ""
173 "When successful, B<swapcontext>() does not return. (But we may return "
174 "later, in case I<oucp> is activated, in which case it looks like "
175 "B<swapcontext>() returns 0.) On error, B<swapcontext>() returns -1 and "
176 "sets I<errno> to indicate the error."
177 msgstr ""
178 "Cuando tiene éxito, B<makecontext()> devuelve 0 y B<swapcontext()> no "
179 "regresa. (Pero puede regresar más tarde, en el caso de que I<oucp> sea "
180 "activado, en cuyo caso devuelve 0 como B<swapcontext()>.) En caso de error, "
181 "ambas devuelven -1 y modifican I<errno> con el valor apropiado."
182
183 #. type: SH
184 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
185 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
186 #, no-wrap
187 msgid "ERRORS"
188 msgstr "ERRORES"
189
190 #. type: TP
191 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
192 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
193 #, no-wrap
194 msgid "B<ENOMEM>"
195 msgstr "B<ENOMEM>"
196
197 #. type: Plain text
198 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
199 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
200 msgid "Insufficient stack space left."
201 msgstr "No queda suficiente espacio en la pila."
202
203 #. type: SH
204 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
205 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
206 #, no-wrap
207 msgid "ATTRIBUTES"
208 msgstr "ATRIBUTOS"
209
210 #. type: Plain text
211 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
212 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
213 msgid ""
214 "For an explanation of the terms used in this section, see B<attributes>(7)."
215 msgstr ""
216 "Para obtener una explicación de los términos usados en esta sección, véase "
217 "B<attributes>(7)."
218
219 #. type: tbl table
220 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
221 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
222 #, no-wrap
223 msgid "Interface"
224 msgstr "Interfaz"
225
226 #. type: tbl table
227 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
228 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
229 #, no-wrap
230 msgid "Attribute"
231 msgstr "Atributo"
232
233 #. type: tbl table
234 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
235 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
236 #, no-wrap
237 msgid "Value"
238 msgstr "Valor"
239
240 #. type: tbl table
241 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
242 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
243 #, no-wrap
244 msgid ".na\n"
245 msgstr ".na\n"
246
247 #. type: tbl table
248 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
249 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
250 #, no-wrap
251 msgid ".nh\n"
252 msgstr ".nh\n"
253
254 #. type: tbl table
255 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
256 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
257 #, no-wrap
258 msgid "B<makecontext>()"
259 msgstr "B<makecontext>()"
260
261 #. type: tbl table
262 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
263 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
264 #, no-wrap
265 msgid "Thread safety"
266 msgstr "Seguridad del hilo"
267
268 #. type: tbl table
269 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
270 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
271 #, fuzzy, no-wrap
272 #| msgid "MT-Safe locale"
273 msgid "MT-Safe race:ucp"
274 msgstr "Configuración regional de multi-hilo seguro"
275
276 #. type: tbl table
277 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
278 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
279 #, no-wrap
280 msgid "B<swapcontext>()"
281 msgstr "B<swapcontext>()"
282
283 #. type: tbl table
284 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
285 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
286 #, fuzzy, no-wrap
287 #| msgid "MT-Safe locale"
288 msgid "MT-Safe race:oucp race:ucp"
289 msgstr "Configuración regional de multi-hilo seguro"
290
291 #. type: SH
292 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
293 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
294 #, no-wrap
295 msgid "STANDARDS"
296 msgstr "ESTÁNDARES"
297
298 #. type: Plain text
299 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
300 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
301 msgid "None."
302 msgstr ""
303
304 #. type: SH
305 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
306 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
307 #, no-wrap
308 msgid "HISTORY"
309 msgstr "HISTORIAL"
310
311 #. type: Plain text
312 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
313 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
314 msgid ""
315 "glibc 2.1. SUSv2, POSIX.1-2001. Removed in POSIX.1-2008, citing "
316 "portability issues, and recommending that applications be rewritten to use "
317 "POSIX threads instead."
318 msgstr ""
319
320 #. type: SH
321 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
322 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
323 #, no-wrap
324 msgid "NOTES"
325 msgstr "NOTAS"
326
327 #. type: Plain text
328 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
329 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
330 msgid ""
331 "The interpretation of I<ucp-E<gt>uc_stack> is just as in B<sigaltstack>(2), "
332 "namely, this struct contains the start and length of a memory area to be "
333 "used as the stack, regardless of the direction of growth of the stack. "
334 "Thus, it is not necessary for the user program to worry about this direction."
335 msgstr ""
336 "La interpretación de I<ucp-E<gt>uc_stack> es como en B<sigaltstack>(2), a "
337 "saber, esta estructura contiene el comienzo y la longitud de un área de "
338 "memoria a ser usada como pila, sea cual sea la dirección de crecimiento de "
339 "la pila. Por lo tanto, no es necesario que los programas de usuario se "
340 "preocupen por esta dirección."
341
342 #. type: Plain text
343 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
344 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
345 msgid ""
346 "On architectures where I<int> and pointer types are the same size (e.g., "
347 "x86-32, where both types are 32 bits), you may be able to get away with "
348 "passing pointers as arguments to B<makecontext>() following I<argc>. "
349 "However, doing this is not guaranteed to be portable, is undefined according "
350 "to the standards, and won't work on architectures where pointers are larger "
351 "than I<int>s. Nevertheless, starting with glibc 2.8, glibc makes some "
352 "changes to B<makecontext>(), to permit this on some 64-bit architectures "
353 "(e.g., x86-64)."
354 msgstr ""
355
356 #. type: SH
357 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
358 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
359 #, no-wrap
360 msgid "EXAMPLES"
361 msgstr "EJEMPLOS"
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 "The example program below demonstrates the use of B<getcontext>(3), "
368 "B<makecontext>(), and B<swapcontext>(). Running the program produces the "
369 "following output:"
370 msgstr ""
371
372 #. type: Plain text
373 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
374 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
375 #, no-wrap
376 msgid ""
377 "$B< ./a.out>\n"
378 "main: swapcontext(&uctx_main, &uctx_func2)\n"
379 "func2: started\n"
380 "func2: swapcontext(&uctx_func2, &uctx_func1)\n"
381 "func1: started\n"
382 "func1: swapcontext(&uctx_func1, &uctx_func2)\n"
383 "func2: returning\n"
384 "func1: returning\n"
385 "main: exiting\n"
386 msgstr ""
387 "$B< ./a.out>\n"
388 "main: swapcontext(&uctx_main, &uctx_func2)\n"
389 "func2: started\n"
390 "func2: swapcontext(&uctx_func2, &uctx_func1)\n"
391 "func1: started\n"
392 "func1: swapcontext(&uctx_func1, &uctx_func2)\n"
393 "func2: returning\n"
394 "func1: returning\n"
395 "main: exiting\n"
396
397 #. type: SS
398 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
399 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
400 #, no-wrap
401 msgid "Program source"
402 msgstr "Código fuente"
403
404 #. type: Plain text
405 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
406 #: opensuse-tumbleweed
407 #, no-wrap
408 msgid ""
409 "#include E<lt>err.hE<gt>\n"
410 "#include E<lt>stdio.hE<gt>\n"
411 "#include E<lt>stdlib.hE<gt>\n"
412 "#include E<lt>ucontext.hE<gt>\n"
413 "\\&\n"
414 "static ucontext_t uctx_main, uctx_func1, uctx_func2;\n"
415 "\\&\n"
416 "static void\n"
417 "func1(void)\n"
418 "{\n"
419 " printf(\"%s: started\\[rs]n\", __func__);\n"
420 " printf(\"%s: swapcontext(&uctx_func1, &uctx_func2)\\[rs]n\", __func__);\n"
421 " if (swapcontext(&uctx_func1, &uctx_func2) == -1)\n"
422 " err(EXIT_FAILURE, \"swapcontext\");\n"
423 " printf(\"%s: returning\\[rs]n\", __func__);\n"
424 "}\n"
425 "\\&\n"
426 "static void\n"
427 "func2(void)\n"
428 "{\n"
429 " printf(\"%s: started\\[rs]n\", __func__);\n"
430 " printf(\"%s: swapcontext(&uctx_func2, &uctx_func1)\\[rs]n\", __func__);\n"
431 " if (swapcontext(&uctx_func2, &uctx_func1) == -1)\n"
432 " err(EXIT_FAILURE, \"swapcontext\");\n"
433 " printf(\"%s: returning\\[rs]n\", __func__);\n"
434 "}\n"
435 "\\&\n"
436 "int\n"
437 "main(int argc, char *argv[])\n"
438 "{\n"
439 " char func1_stack[16384];\n"
440 " char func2_stack[16384];\n"
441 "\\&\n"
442 " if (getcontext(&uctx_func1) == -1)\n"
443 " err(EXIT_FAILURE, \"getcontext\");\n"
444 " uctx_func1.uc_stack.ss_sp = func1_stack;\n"
445 " uctx_func1.uc_stack.ss_size = sizeof(func1_stack);\n"
446 " uctx_func1.uc_link = &uctx_main;\n"
447 " makecontext(&uctx_func1, func1, 0);\n"
448 "\\&\n"
449 " if (getcontext(&uctx_func2) == -1)\n"
450 " err(EXIT_FAILURE, \"getcontext\");\n"
451 " uctx_func2.uc_stack.ss_sp = func2_stack;\n"
452 " uctx_func2.uc_stack.ss_size = sizeof(func2_stack);\n"
453 " /* Successor context is f1(), unless argc E<gt> 1 */\n"
454 " uctx_func2.uc_link = (argc E<gt> 1) ? NULL : &uctx_func1;\n"
455 " makecontext(&uctx_func2, func2, 0);\n"
456 "\\&\n"
457 " printf(\"%s: swapcontext(&uctx_main, &uctx_func2)\\[rs]n\", __func__);\n"
458 " if (swapcontext(&uctx_main, &uctx_func2) == -1)\n"
459 " err(EXIT_FAILURE, \"swapcontext\");\n"
460 "\\&\n"
461 " printf(\"%s: exiting\\[rs]n\", __func__);\n"
462 " exit(EXIT_SUCCESS);\n"
463 "}\n"
464 msgstr ""
465
466 #. SRC END
467 #. type: SH
468 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
469 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
470 #, no-wrap
471 msgid "SEE ALSO"
472 msgstr "VÉASE TAMBIÉN"
473
474 #. type: Plain text
475 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
476 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
477 msgid ""
478 "B<sigaction>(2), B<sigaltstack>(2), B<sigprocmask>(2), B<getcontext>(3), "
479 "B<sigsetjmp>(3)"
480 msgstr ""
481 "B<sigaction>(2), B<sigaltstack>(2), B<sigprocmask>(2), B<getcontext>(3), "
482 "B<sigsetjmp>(3)"
483
484 #. type: TH
485 #: debian-trixie
486 #, no-wrap
487 msgid "2024-06-15"
488 msgstr "15 Junio 2024"
489
490 #. type: TH
491 #: debian-trixie
492 #, no-wrap
493 msgid "Linux man-pages 6.9.1"
494 msgstr "Páginas de Manual de Linux 6.9.1"
495
496 #. type: Plain text
497 #: debian-trixie
498 msgid "Standard C library (I<libc>, I<-lc>)"
499 msgstr "Biblioteca Estándar C (I<libc>, I<-lc>)"
500
501 #. type: Plain text
502 #: debian-trixie
503 #, fuzzy, no-wrap
504 #| msgid "B<void makecontext(ucontext_t *>I<ucp>B<, void (*>I<func>B<)(),> B<int >I<argc>B<, ...);>"
505 msgid ""
506 "B<void makecontext(ucontext_t *>I<ucp>B<, void (*>I<func>B<)(), int >I<argc>B<, ...);>\n"
507 "B<int swapcontext(ucontext_t *restrict >I<oucp>B<,>\n"
508 "B< const ucontext_t *restrict >I<ucp>B<);>\n"
509 msgstr "B<void makecontext(ucontext_t *>I<ucp>B<, void (*>I<func>B<)(),> B<int >I<argc>B<, ...);>"
510
511 #. type: Plain text
512 #: debian-trixie fedora-44 fedora-rawhide
513 #, no-wrap
514 msgid ""
515 "#include E<lt>stdio.hE<gt>\n"
516 "#include E<lt>stdlib.hE<gt>\n"
517 "#include E<lt>ucontext.hE<gt>\n"
518 "\\&\n"
519 "static ucontext_t uctx_main, uctx_func1, uctx_func2;\n"
520 "\\&\n"
521 "#define handle_error(msg) \\[rs]\n"
522 " do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
523 "\\&\n"
524 "static void\n"
525 "func1(void)\n"
526 "{\n"
527 " printf(\"%s: started\\[rs]n\", __func__);\n"
528 " printf(\"%s: swapcontext(&uctx_func1, &uctx_func2)\\[rs]n\", __func__);\n"
529 " if (swapcontext(&uctx_func1, &uctx_func2) == -1)\n"
530 " handle_error(\"swapcontext\");\n"
531 " printf(\"%s: returning\\[rs]n\", __func__);\n"
532 "}\n"
533 "\\&\n"
534 "static void\n"
535 "func2(void)\n"
536 "{\n"
537 " printf(\"%s: started\\[rs]n\", __func__);\n"
538 " printf(\"%s: swapcontext(&uctx_func2, &uctx_func1)\\[rs]n\", __func__);\n"
539 " if (swapcontext(&uctx_func2, &uctx_func1) == -1)\n"
540 " handle_error(\"swapcontext\");\n"
541 " printf(\"%s: returning\\[rs]n\", __func__);\n"
542 "}\n"
543 "\\&\n"
544 "int\n"
545 "main(int argc, char *argv[])\n"
546 "{\n"
547 " char func1_stack[16384];\n"
548 " char func2_stack[16384];\n"
549 "\\&\n"
550 " if (getcontext(&uctx_func1) == -1)\n"
551 " handle_error(\"getcontext\");\n"
552 " uctx_func1.uc_stack.ss_sp = func1_stack;\n"
553 " uctx_func1.uc_stack.ss_size = sizeof(func1_stack);\n"
554 " uctx_func1.uc_link = &uctx_main;\n"
555 " makecontext(&uctx_func1, func1, 0);\n"
556 "\\&\n"
557 " if (getcontext(&uctx_func2) == -1)\n"
558 " handle_error(\"getcontext\");\n"
559 " uctx_func2.uc_stack.ss_sp = func2_stack;\n"
560 " uctx_func2.uc_stack.ss_size = sizeof(func2_stack);\n"
561 " /* Successor context is f1(), unless argc E<gt> 1 */\n"
562 " uctx_func2.uc_link = (argc E<gt> 1) ? NULL : &uctx_func1;\n"
563 " makecontext(&uctx_func2, func2, 0);\n"
564 "\\&\n"
565 " printf(\"%s: swapcontext(&uctx_main, &uctx_func2)\\[rs]n\", __func__);\n"
566 " if (swapcontext(&uctx_main, &uctx_func2) == -1)\n"
567 " handle_error(\"swapcontext\");\n"
568 "\\&\n"
569 " printf(\"%s: exiting\\[rs]n\", __func__);\n"
570 " exit(EXIT_SUCCESS);\n"
571 "}\n"
572 msgstr ""
573
574 #. type: TH
575 #: fedora-44 fedora-rawhide
576 #, no-wrap
577 msgid "2024-12-13"
578 msgstr "13 Diciembre 2024"
579
580 #. type: TH
581 #: fedora-44 fedora-rawhide
582 #, no-wrap
583 msgid "Linux man-pages 6.13"
584 msgstr "Páginas de Manual de Linux 6.13"
585
586 #. type: TH
587 #: mageia-cauldron
588 #, no-wrap
589 msgid "Linux man-pages 6.17"
590 msgstr "Páginas de Manual de Linux 6.17"
591
592 #. type: TH
593 #: opensuse-leap-16-1 opensuse-tumbleweed
594 #, no-wrap
595 msgid "Linux man-pages (unreleased)"
596 msgstr "Páginas de Manual de Linux (no publicadas)"