Debian Codegraph @

templates/man3/makecontext.3.pot

raw
1 # SOME DESCRIPTIVE TITLE
2 # Copyright (C) YEAR Free Software Foundation, Inc.
3 # This file is distributed under the same license as the PACKAGE package.
4 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5 #
6 #, fuzzy
7 msgid ""
8 msgstr ""
9 "Project-Id-Version: PACKAGE VERSION\n"
10 "POT-Creation-Date: 2026-06-05 06:30+0200\n"
11 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13 "Language-Team: LANGUAGE <[email protected]>\n"
14 "Language: \n"
15 "MIME-Version: 1.0\n"
16 "Content-Type: text/plain; charset=UTF-8\n"
17 "Content-Transfer-Encoding: 8bit\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 #, no-wrap
23 msgid "makecontext"
24 msgstr ""
25
26 #. type: TH
27 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
28 #: opensuse-tumbleweed
29 #, no-wrap
30 msgid "2026-02-08"
31 msgstr ""
32
33 #. type: TH
34 #: archlinux debian-unstable
35 #, no-wrap
36 msgid "Linux man-pages 6.18"
37 msgstr ""
38
39 #. type: SH
40 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
41 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
42 #, no-wrap
43 msgid "NAME"
44 msgstr ""
45
46 #. type: Plain text
47 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
48 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
49 msgid "makecontext, swapcontext - manipulate user context"
50 msgstr ""
51
52 #. type: SH
53 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
54 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
55 #, no-wrap
56 msgid "LIBRARY"
57 msgstr ""
58
59 #. type: Plain text
60 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
61 #: opensuse-leap-16-1 opensuse-tumbleweed
62 msgid "Standard C library (I<libc>,\\ I<-lc>)"
63 msgstr ""
64
65 #. type: SH
66 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
67 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
68 #, no-wrap
69 msgid "SYNOPSIS"
70 msgstr ""
71
72 #. type: Plain text
73 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
74 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
75 #, no-wrap
76 msgid "B<#include E<lt>ucontext.hE<gt>>\n"
77 msgstr ""
78
79 #. type: Plain text
80 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
81 #: opensuse-leap-16-1 opensuse-tumbleweed
82 #, no-wrap
83 msgid ""
84 "B<void makecontext(ucontext_t *>I<ucp>B<, typeof(void (int >I<arg0>B<, ...)) *>I<func>B<,>\n"
85 "B< int >I<argc>B<, ...);>\n"
86 "B<int swapcontext(ucontext_t *restrict >I<oucp>B<,>\n"
87 "B< const ucontext_t *restrict >I<ucp>B<);>\n"
88 msgstr ""
89
90 #. type: SH
91 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
92 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
93 #, no-wrap
94 msgid "DESCRIPTION"
95 msgstr ""
96
97 #. type: Plain text
98 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
99 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
100 msgid ""
101 "In a System V-like environment, one has the type I<ucontext_t> (defined in "
102 "I<E<lt>ucontext.hE<gt>> and described in B<getcontext>(3)) and the four "
103 "functions B<getcontext>(3), B<setcontext>(3), B<makecontext>(), and "
104 "B<swapcontext>() that allow user-level context switching between multiple "
105 "threads of control within a process."
106 msgstr ""
107
108 #. type: Plain text
109 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
110 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
111 msgid ""
112 "The B<makecontext>() function modifies the context pointed to by I<ucp> "
113 "(which was obtained from a call to B<getcontext>(3)). Before invoking "
114 "B<makecontext>(), the caller must allocate a new stack for this context and "
115 "assign its address to I<ucp-E<gt>uc_stack>, and define a successor context "
116 "and assign its address to I<ucp-E<gt>uc_link>."
117 msgstr ""
118
119 #. type: Plain text
120 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
121 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
122 msgid ""
123 "When this context is later activated (using B<setcontext>(3) or "
124 "B<swapcontext>()) the function I<func> is called, and passed the series of "
125 "integer (I<int>) arguments that follow I<argc>; the caller must specify the "
126 "number of these arguments in I<argc>. When this function returns, the "
127 "successor context is activated. If the successor context pointer is NULL, "
128 "the thread exits."
129 msgstr ""
130
131 #. type: Plain text
132 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
133 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
134 msgid ""
135 "The B<swapcontext>() function saves the current context in the structure "
136 "pointed to by I<oucp>, and then activates the context pointed to by I<ucp>."
137 msgstr ""
138
139 #. type: SH
140 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
141 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
142 #, no-wrap
143 msgid "RETURN VALUE"
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 "When successful, B<swapcontext>() does not return. (But we may return "
151 "later, in case I<oucp> is activated, in which case it looks like "
152 "B<swapcontext>() returns 0.) On error, B<swapcontext>() returns -1 and "
153 "sets I<errno> to indicate the error."
154 msgstr ""
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 "ERRORS"
161 msgstr ""
162
163 #. type: TP
164 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
165 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
166 #, no-wrap
167 msgid "B<ENOMEM>"
168 msgstr ""
169
170 #. type: Plain text
171 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
172 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
173 msgid "Insufficient stack space left."
174 msgstr ""
175
176 #. type: SH
177 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
178 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
179 #, no-wrap
180 msgid "ATTRIBUTES"
181 msgstr ""
182
183 #. type: Plain text
184 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
185 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
186 msgid ""
187 "For an explanation of the terms used in this section, see B<attributes>(7)."
188 msgstr ""
189
190 #. type: tbl table
191 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
192 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
193 #, no-wrap
194 msgid "Interface"
195 msgstr ""
196
197 #. type: tbl table
198 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
199 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
200 #, no-wrap
201 msgid "Attribute"
202 msgstr ""
203
204 #. type: tbl table
205 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
206 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
207 #, no-wrap
208 msgid "Value"
209 msgstr ""
210
211 #. type: tbl table
212 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
213 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
214 #, no-wrap
215 msgid ".na\n"
216 msgstr ""
217
218 #. type: tbl table
219 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
220 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
221 #, no-wrap
222 msgid ".nh\n"
223 msgstr ""
224
225 #. type: tbl table
226 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
227 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
228 #, no-wrap
229 msgid "B<makecontext>()"
230 msgstr ""
231
232 #. type: tbl table
233 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
234 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
235 #, no-wrap
236 msgid "Thread safety"
237 msgstr ""
238
239 #. type: tbl table
240 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
241 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
242 #, no-wrap
243 msgid "MT-Safe race:ucp"
244 msgstr ""
245
246 #. type: tbl table
247 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
248 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
249 #, no-wrap
250 msgid "B<swapcontext>()"
251 msgstr ""
252
253 #. type: tbl table
254 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
255 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
256 #, no-wrap
257 msgid "MT-Safe race:oucp race:ucp"
258 msgstr ""
259
260 #. type: SH
261 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
262 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
263 #, no-wrap
264 msgid "STANDARDS"
265 msgstr ""
266
267 #. type: Plain text
268 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
269 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
270 msgid "None."
271 msgstr ""
272
273 #. type: SH
274 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
275 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
276 #, no-wrap
277 msgid "HISTORY"
278 msgstr ""
279
280 #. type: Plain text
281 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
282 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
283 msgid ""
284 "glibc 2.1. SUSv2, POSIX.1-2001. Removed in POSIX.1-2008, citing "
285 "portability issues, and recommending that applications be rewritten to use "
286 "POSIX threads instead."
287 msgstr ""
288
289 #. type: SH
290 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
291 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
292 #, no-wrap
293 msgid "NOTES"
294 msgstr ""
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 "The interpretation of I<ucp-E<gt>uc_stack> is just as in B<sigaltstack>(2), "
301 "namely, this struct contains the start and length of a memory area to be "
302 "used as the stack, regardless of the direction of growth of the stack. "
303 "Thus, it is not necessary for the user program to worry about this direction."
304 msgstr ""
305
306 #. type: Plain text
307 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
308 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
309 msgid ""
310 "On architectures where I<int> and pointer types are the same size (e.g., "
311 "x86-32, where both types are 32 bits), you may be able to get away with "
312 "passing pointers as arguments to B<makecontext>() following I<argc>. "
313 "However, doing this is not guaranteed to be portable, is undefined according "
314 "to the standards, and won't work on architectures where pointers are larger "
315 "than I<int>s. Nevertheless, starting with glibc 2.8, glibc makes some "
316 "changes to B<makecontext>(), to permit this on some 64-bit architectures "
317 "(e.g., x86-64)."
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 "EXAMPLES"
325 msgstr ""
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 example program below demonstrates the use of B<getcontext>(3), "
332 "B<makecontext>(), and B<swapcontext>(). Running the program produces the "
333 "following output:"
334 msgstr ""
335
336 #. type: Plain text
337 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
338 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
339 #, no-wrap
340 msgid ""
341 "$B< ./a.out>\n"
342 "main: swapcontext(&uctx_main, &uctx_func2)\n"
343 "func2: started\n"
344 "func2: swapcontext(&uctx_func2, &uctx_func1)\n"
345 "func1: started\n"
346 "func1: swapcontext(&uctx_func1, &uctx_func2)\n"
347 "func2: returning\n"
348 "func1: returning\n"
349 "main: exiting\n"
350 msgstr ""
351
352 #. type: SS
353 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
354 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
355 #, no-wrap
356 msgid "Program source"
357 msgstr ""
358
359 #. type: Plain text
360 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
361 #: opensuse-tumbleweed
362 #, no-wrap
363 msgid ""
364 "#include E<lt>err.hE<gt>\n"
365 "#include E<lt>stdio.hE<gt>\n"
366 "#include E<lt>stdlib.hE<gt>\n"
367 "#include E<lt>ucontext.hE<gt>\n"
368 "\\&\n"
369 "static ucontext_t uctx_main, uctx_func1, uctx_func2;\n"
370 "\\&\n"
371 "static void\n"
372 "func1(void)\n"
373 "{\n"
374 " printf(\"%s: started\\[rs]n\", __func__);\n"
375 " printf(\"%s: swapcontext(&uctx_func1, &uctx_func2)\\[rs]n\", __func__);\n"
376 " if (swapcontext(&uctx_func1, &uctx_func2) == -1)\n"
377 " err(EXIT_FAILURE, \"swapcontext\");\n"
378 " printf(\"%s: returning\\[rs]n\", __func__);\n"
379 "}\n"
380 "\\&\n"
381 "static void\n"
382 "func2(void)\n"
383 "{\n"
384 " printf(\"%s: started\\[rs]n\", __func__);\n"
385 " printf(\"%s: swapcontext(&uctx_func2, &uctx_func1)\\[rs]n\", __func__);\n"
386 " if (swapcontext(&uctx_func2, &uctx_func1) == -1)\n"
387 " err(EXIT_FAILURE, \"swapcontext\");\n"
388 " printf(\"%s: returning\\[rs]n\", __func__);\n"
389 "}\n"
390 "\\&\n"
391 "int\n"
392 "main(int argc, char *argv[])\n"
393 "{\n"
394 " char func1_stack[16384];\n"
395 " char func2_stack[16384];\n"
396 "\\&\n"
397 " if (getcontext(&uctx_func1) == -1)\n"
398 " err(EXIT_FAILURE, \"getcontext\");\n"
399 " uctx_func1.uc_stack.ss_sp = func1_stack;\n"
400 " uctx_func1.uc_stack.ss_size = sizeof(func1_stack);\n"
401 " uctx_func1.uc_link = &uctx_main;\n"
402 " makecontext(&uctx_func1, func1, 0);\n"
403 "\\&\n"
404 " if (getcontext(&uctx_func2) == -1)\n"
405 " err(EXIT_FAILURE, \"getcontext\");\n"
406 " uctx_func2.uc_stack.ss_sp = func2_stack;\n"
407 " uctx_func2.uc_stack.ss_size = sizeof(func2_stack);\n"
408 " /* Successor context is f1(), unless argc E<gt> 1 */\n"
409 " uctx_func2.uc_link = (argc E<gt> 1) ? NULL : &uctx_func1;\n"
410 " makecontext(&uctx_func2, func2, 0);\n"
411 "\\&\n"
412 " printf(\"%s: swapcontext(&uctx_main, &uctx_func2)\\[rs]n\", __func__);\n"
413 " if (swapcontext(&uctx_main, &uctx_func2) == -1)\n"
414 " err(EXIT_FAILURE, \"swapcontext\");\n"
415 "\\&\n"
416 " printf(\"%s: exiting\\[rs]n\", __func__);\n"
417 " exit(EXIT_SUCCESS);\n"
418 "}\n"
419 msgstr ""
420
421 #. SRC END
422 #. type: SH
423 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
424 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
425 #, no-wrap
426 msgid "SEE ALSO"
427 msgstr ""
428
429 #. type: Plain text
430 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
431 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
432 msgid ""
433 "B<sigaction>(2), B<sigaltstack>(2), B<sigprocmask>(2), B<getcontext>(3), "
434 "B<sigsetjmp>(3)"
435 msgstr ""
436
437 #. type: TH
438 #: debian-trixie
439 #, no-wrap
440 msgid "2024-06-15"
441 msgstr ""
442
443 #. type: TH
444 #: debian-trixie
445 #, no-wrap
446 msgid "Linux man-pages 6.9.1"
447 msgstr ""
448
449 #. type: Plain text
450 #: debian-trixie
451 msgid "Standard C library (I<libc>, I<-lc>)"
452 msgstr ""
453
454 #. type: Plain text
455 #: debian-trixie
456 #, no-wrap
457 msgid ""
458 "B<void makecontext(ucontext_t *>I<ucp>B<, void (*>I<func>B<)(), int >I<argc>B<, ...);>\n"
459 "B<int swapcontext(ucontext_t *restrict >I<oucp>B<,>\n"
460 "B< const ucontext_t *restrict >I<ucp>B<);>\n"
461 msgstr ""
462
463 #. type: Plain text
464 #: debian-trixie fedora-44 fedora-rawhide
465 #, no-wrap
466 msgid ""
467 "#include E<lt>stdio.hE<gt>\n"
468 "#include E<lt>stdlib.hE<gt>\n"
469 "#include E<lt>ucontext.hE<gt>\n"
470 "\\&\n"
471 "static ucontext_t uctx_main, uctx_func1, uctx_func2;\n"
472 "\\&\n"
473 "#define handle_error(msg) \\[rs]\n"
474 " do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
475 "\\&\n"
476 "static void\n"
477 "func1(void)\n"
478 "{\n"
479 " printf(\"%s: started\\[rs]n\", __func__);\n"
480 " printf(\"%s: swapcontext(&uctx_func1, &uctx_func2)\\[rs]n\", __func__);\n"
481 " if (swapcontext(&uctx_func1, &uctx_func2) == -1)\n"
482 " handle_error(\"swapcontext\");\n"
483 " printf(\"%s: returning\\[rs]n\", __func__);\n"
484 "}\n"
485 "\\&\n"
486 "static void\n"
487 "func2(void)\n"
488 "{\n"
489 " printf(\"%s: started\\[rs]n\", __func__);\n"
490 " printf(\"%s: swapcontext(&uctx_func2, &uctx_func1)\\[rs]n\", __func__);\n"
491 " if (swapcontext(&uctx_func2, &uctx_func1) == -1)\n"
492 " handle_error(\"swapcontext\");\n"
493 " printf(\"%s: returning\\[rs]n\", __func__);\n"
494 "}\n"
495 "\\&\n"
496 "int\n"
497 "main(int argc, char *argv[])\n"
498 "{\n"
499 " char func1_stack[16384];\n"
500 " char func2_stack[16384];\n"
501 "\\&\n"
502 " if (getcontext(&uctx_func1) == -1)\n"
503 " handle_error(\"getcontext\");\n"
504 " uctx_func1.uc_stack.ss_sp = func1_stack;\n"
505 " uctx_func1.uc_stack.ss_size = sizeof(func1_stack);\n"
506 " uctx_func1.uc_link = &uctx_main;\n"
507 " makecontext(&uctx_func1, func1, 0);\n"
508 "\\&\n"
509 " if (getcontext(&uctx_func2) == -1)\n"
510 " handle_error(\"getcontext\");\n"
511 " uctx_func2.uc_stack.ss_sp = func2_stack;\n"
512 " uctx_func2.uc_stack.ss_size = sizeof(func2_stack);\n"
513 " /* Successor context is f1(), unless argc E<gt> 1 */\n"
514 " uctx_func2.uc_link = (argc E<gt> 1) ? NULL : &uctx_func1;\n"
515 " makecontext(&uctx_func2, func2, 0);\n"
516 "\\&\n"
517 " printf(\"%s: swapcontext(&uctx_main, &uctx_func2)\\[rs]n\", __func__);\n"
518 " if (swapcontext(&uctx_main, &uctx_func2) == -1)\n"
519 " handle_error(\"swapcontext\");\n"
520 "\\&\n"
521 " printf(\"%s: exiting\\[rs]n\", __func__);\n"
522 " exit(EXIT_SUCCESS);\n"
523 "}\n"
524 msgstr ""
525
526 #. type: TH
527 #: fedora-44 fedora-rawhide
528 #, no-wrap
529 msgid "2024-12-13"
530 msgstr ""
531
532 #. type: TH
533 #: fedora-44 fedora-rawhide
534 #, no-wrap
535 msgid "Linux man-pages 6.13"
536 msgstr ""
537
538 #. type: TH
539 #: mageia-cauldron
540 #, no-wrap
541 msgid "Linux man-pages 6.17"
542 msgstr ""
543
544 #. type: TH
545 #: opensuse-leap-16-1 opensuse-tumbleweed
546 #, no-wrap
547 msgid "Linux man-pages (unreleased)"
548 msgstr ""