Debian Codegraph @

po/ro/man3/makecontext.3.po

raw
1 # Romanian translation of manpages
2 # This file is distributed under the same license as the manpages-l10n package.
3 # Copyright © of this file:
4 # Remus-Gabriel Chelu <[email protected]>, 2024, 2025.
5 msgid ""
6 msgstr ""
7 "Project-Id-Version: manpages-l10n 4.24.0\n"
8 "POT-Creation-Date: 2026-06-05 06:30+0200\n"
9 "PO-Revision-Date: 2025-11-05 18:57+0100\n"
10 "Last-Translator: Remus-Gabriel Chelu <[email protected]>\n"
11 "Language-Team: Romanian <[email protected]>\n"
12 "Language: ro\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=3; plural=n==1 ? 0 : (n==0 || (n%100 > 0 && n%100 < "
17 "20)) ? 1 : 2;\n"
18 "X-Generator: Poedit 3.6\n"
19
20 #. type: TH
21 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
22 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
23 #, no-wrap
24 msgid "makecontext"
25 msgstr "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 februarie 2026"
33
34 #. type: TH
35 #: archlinux debian-unstable
36 #, no-wrap
37 msgid "Linux man-pages 6.18"
38 msgstr "Pagini de manual de Linux 6.18"
39
40 #. type: SH
41 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
42 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
43 #, no-wrap
44 msgid "NAME"
45 msgstr "NUME"
46
47 #. type: Plain text
48 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
49 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
50 msgid "makecontext, swapcontext - manipulate user context"
51 msgstr "makecontext, swapcontext - manipulează contextul utilizatorului"
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 "LIBRARY"
58 msgstr "BIBLIOTECA"
59
60 #. type: Plain text
61 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
62 #: opensuse-leap-16-1 opensuse-tumbleweed
63 msgid "Standard C library (I<libc>,\\ I<-lc>)"
64 msgstr "Biblioteca C standard (I<libc>, I<-lc>)"
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 "SYNOPSIS"
71 msgstr "SINOPSIS"
72
73 #. type: Plain text
74 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
75 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
76 #, no-wrap
77 msgid "B<#include E<lt>ucontext.hE<gt>>\n"
78 msgstr "B<#include E<lt>ucontext.hE<gt>>\n"
79
80 #. type: Plain text
81 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
82 #: opensuse-leap-16-1 opensuse-tumbleweed
83 #, no-wrap
84 msgid ""
85 "B<void makecontext(ucontext_t *>I<ucp>B<, typeof(void (int >I<arg0>B<, ...)) *>I<func>B<,>\n"
86 "B< int >I<argc>B<, ...);>\n"
87 "B<int swapcontext(ucontext_t *restrict >I<oucp>B<,>\n"
88 "B< const ucontext_t *restrict >I<ucp>B<);>\n"
89 msgstr ""
90 "B<void makecontext(ucontext_t *>I<ucp>B<, typeof(void (int >I<arg0>B<, ...)) *>I<func>B<,>\n"
91 "B< int >I<argc>B<, ...);>\n"
92 "B<int swapcontext(ucontext_t *restrict >I<oucp>B<,>\n"
93 "B< const ucontext_t *restrict >I<ucp>B<);>\n"
94
95 #. type: SH
96 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
97 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
98 #, no-wrap
99 msgid "DESCRIPTION"
100 msgstr "DESCRIERE"
101
102 #. type: Plain text
103 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
104 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
105 msgid ""
106 "In a System V-like environment, one has the type I<ucontext_t> (defined in "
107 "I<E<lt>ucontext.hE<gt>> and described in B<getcontext>(3)) and the four "
108 "functions B<getcontext>(3), B<setcontext>(3), B<makecontext>(), and "
109 "B<swapcontext>() that allow user-level context switching between multiple "
110 "threads of control within a process."
111 msgstr ""
112 "Într-un mediu de tip System V, există tipul I<ucontext_t> (definit în "
113 "I<E<lt>ucontext.hE<gt>> și descris în B<getcontext>(3)) și cele patru "
114 "funcții B<getcontext>(3), B<setcontext>(3), B<makecontext>() și "
115 "B<swapcontext>() care permit comutarea contextului la nivel de utilizator "
116 "între mai multe fire de control în cadrul unui proces."
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 "The B<makecontext>() function modifies the context pointed to by I<ucp> "
123 "(which was obtained from a call to B<getcontext>(3)). Before invoking "
124 "B<makecontext>(), the caller must allocate a new stack for this context and "
125 "assign its address to I<ucp-E<gt>uc_stack>, and define a successor context "
126 "and assign its address to I<ucp-E<gt>uc_link>."
127 msgstr ""
128 "Funcția B<makecontext>() modifică contextul indicat de I<ucp> (care a fost "
129 "obținut în urma unui apel la B<getcontext>(3)). Înainte de a invoca "
130 "B<makecontext>(), apelantul trebuie să aloce o nouă stivă pentru acest "
131 "context și să îi atribuie adresa lui I<ucp-E<gt>uc_stack>, precum și să "
132 "definească un context succesor și să îi atribuie adresa lui I<ucp-"
133 "E<gt>uc_link>."
134
135 #. type: Plain text
136 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
137 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
138 msgid ""
139 "When this context is later activated (using B<setcontext>(3) or "
140 "B<swapcontext>()) the function I<func> is called, and passed the series of "
141 "integer (I<int>) arguments that follow I<argc>; the caller must specify the "
142 "number of these arguments in I<argc>. When this function returns, the "
143 "successor context is activated. If the successor context pointer is NULL, "
144 "the thread exits."
145 msgstr ""
146 "Atunci când acest context este activat ulterior (utilizând B<setcontext>(3) "
147 "sau B<swapcontext>()), funcția I<func> este apelată și i se transmite seria "
148 "de argumente întregi (I<int>) care urmează după I<argc>; apelantul trebuie "
149 "să specifice numărul acestor argumente în I<argc>. Atunci când această "
150 "funcție returnează, contextul succesor este activat. Dacă indicatorul "
151 "contextului succesor este NULL, firul de execuție iese."
152
153 #. type: Plain text
154 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
155 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
156 msgid ""
157 "The B<swapcontext>() function saves the current context in the structure "
158 "pointed to by I<oucp>, and then activates the context pointed to by I<ucp>."
159 msgstr ""
160 "Funcția B<swapcontext>() salvează contextul curent în structura indicată de "
161 "I<oucp>, iar apoi activează contextul indicat de I<ucp>."
162
163 #. type: SH
164 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
165 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
166 #, no-wrap
167 msgid "RETURN VALUE"
168 msgstr "VALOAREA RETURNATĂ"
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 ""
174 "When successful, B<swapcontext>() does not return. (But we may return "
175 "later, in case I<oucp> is activated, in which case it looks like "
176 "B<swapcontext>() returns 0.) On error, B<swapcontext>() returns -1 and "
177 "sets I<errno> to indicate the error."
178 msgstr ""
179 "Atunci când reușește, B<swapcontext>() nu returnează. (Dar am putea reveni "
180 "mai târziu, în cazul în care I<oucp> este activat, caz în care se pare că "
181 "B<swapcontext>() returnează 0.) În caz de eroare, B<swapcontext>() "
182 "returnează -1 și configurează I<errno> pentru a indica eroarea."
183
184 #. type: SH
185 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
186 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
187 #, no-wrap
188 msgid "ERRORS"
189 msgstr "ERORI-IEȘIRE"
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<ENOMEM>"
196 msgstr "B<ENOMEM>"
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 "Insufficient stack space left."
202 msgstr "Spațiu rămas în stivă insuficient."
203
204 #. type: SH
205 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
206 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
207 #, no-wrap
208 msgid "ATTRIBUTES"
209 msgstr "ATRIBUTE"
210
211 #. type: Plain text
212 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
213 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
214 msgid ""
215 "For an explanation of the terms used in this section, see B<attributes>(7)."
216 msgstr ""
217 "Pentru o explicație a termenilor folosiți în această secțiune, a se vedea "
218 "B<attributes>(7)."
219
220 #. type: tbl table
221 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
222 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
223 #, no-wrap
224 msgid "Interface"
225 msgstr "Interfață"
226
227 #. type: tbl table
228 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
229 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
230 #, no-wrap
231 msgid "Attribute"
232 msgstr "Atribut"
233
234 #. type: tbl table
235 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
236 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
237 #, no-wrap
238 msgid "Value"
239 msgstr "Valoare"
240
241 #. type: tbl table
242 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
243 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
244 #, no-wrap
245 msgid ".na\n"
246 msgstr ".na\n"
247
248 #. type: tbl table
249 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
250 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
251 #, no-wrap
252 msgid ".nh\n"
253 msgstr ".nh\n"
254
255 #. type: tbl table
256 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
257 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
258 #, no-wrap
259 msgid "B<makecontext>()"
260 msgstr "B<makecontext>()"
261
262 #. type: tbl table
263 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
264 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
265 #, no-wrap
266 msgid "Thread safety"
267 msgstr "Siguranța firelor"
268
269 #. type: tbl table
270 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
271 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
272 #, no-wrap
273 msgid "MT-Safe race:ucp"
274 msgstr "MT-Safe race:ucp"
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 #, no-wrap
287 msgid "MT-Safe race:oucp race:ucp"
288 msgstr "MT-Safe race:oucp race:ucp"
289
290 #. type: SH
291 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
292 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
293 #, no-wrap
294 msgid "STANDARDS"
295 msgstr "STANDARDE"
296
297 #. type: Plain text
298 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
299 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
300 msgid "None."
301 msgstr "Niciunul."
302
303 #. type: SH
304 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
305 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
306 #, no-wrap
307 msgid "HISTORY"
308 msgstr "ISTORIC"
309
310 #. type: Plain text
311 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
312 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
313 msgid ""
314 "glibc 2.1. SUSv2, POSIX.1-2001. Removed in POSIX.1-2008, citing "
315 "portability issues, and recommending that applications be rewritten to use "
316 "POSIX threads instead."
317 msgstr ""
318 "glibc 2.1. SUSv2, POSIX.1-2001. Eliminată în POSIX.1-2008, citând probleme "
319 "de portabilitate și recomandând ca aplicațiile să fie rescrise pentru a "
320 "utiliza în schimb fire POSIX."
321
322 #. type: SH
323 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
324 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
325 #, no-wrap
326 msgid "NOTES"
327 msgstr "NOTE"
328
329 #. type: Plain text
330 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
331 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
332 msgid ""
333 "The interpretation of I<ucp-E<gt>uc_stack> is just as in B<sigaltstack>(2), "
334 "namely, this struct contains the start and length of a memory area to be "
335 "used as the stack, regardless of the direction of growth of the stack. "
336 "Thus, it is not necessary for the user program to worry about this direction."
337 msgstr ""
338 "Interpretarea I<ucp-E<gt>uc_stack> este la fel ca în B<sigaltstack>(2), și "
339 "anume, această structură conține începutul și lungimea unei zone de memorie "
340 "care urmează să fie utilizată ca stivă, indiferent de direcția de creștere a "
341 "stivei. Astfel, nu este necesar ca programul utilizatorului să se preocupe "
342 "de această direcție."
343
344 #. type: Plain text
345 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
346 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
347 msgid ""
348 "On architectures where I<int> and pointer types are the same size (e.g., "
349 "x86-32, where both types are 32 bits), you may be able to get away with "
350 "passing pointers as arguments to B<makecontext>() following I<argc>. "
351 "However, doing this is not guaranteed to be portable, is undefined according "
352 "to the standards, and won't work on architectures where pointers are larger "
353 "than I<int>s. Nevertheless, starting with glibc 2.8, glibc makes some "
354 "changes to B<makecontext>(), to permit this on some 64-bit architectures "
355 "(e.g., x86-64)."
356 msgstr ""
357 "Pe arhitecturile în care tipurile I<int> și indicatorul sunt de aceeași "
358 "dimensiune (de exemplu, x86-32, unde ambele tipuri sunt de 32 de biți), este "
359 "posibil să puteți scăpa pasând indicatorii ca argumente la B<makecontext>() "
360 "după I<argc>. Cu toate acestea, acest lucru nu este garantat a fi portabil, "
361 "nu este definit în conformitate cu standardele și nu va funcționa pe "
362 "arhitecturile în care indicatorii sunt mai mari decât I<int>-urile. Cu "
363 "toate acestea, începând cu glibc 2.8, glibc face unele modificări la "
364 "B<makecontext>(), pentru a permite acest lucru pe unele arhitecturi pe 64 de "
365 "biți (de exemplu, x86-64)."
366
367 #. type: SH
368 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
369 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
370 #, no-wrap
371 msgid "EXAMPLES"
372 msgstr "EXEMPLE"
373
374 #. type: Plain text
375 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
376 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
377 msgid ""
378 "The example program below demonstrates the use of B<getcontext>(3), "
379 "B<makecontext>(), and B<swapcontext>(). Running the program produces the "
380 "following output:"
381 msgstr ""
382 "Programul de exemplu de mai jos demonstrează utilizarea B<getcontext>(3), "
383 "B<makecontext>() și B<swapcontext>(). Rularea programului produce următoarea "
384 "ieșire:"
385
386 #. type: Plain text
387 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
388 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
389 #, no-wrap
390 msgid ""
391 "$B< ./a.out>\n"
392 "main: swapcontext(&uctx_main, &uctx_func2)\n"
393 "func2: started\n"
394 "func2: swapcontext(&uctx_func2, &uctx_func1)\n"
395 "func1: started\n"
396 "func1: swapcontext(&uctx_func1, &uctx_func2)\n"
397 "func2: returning\n"
398 "func1: returning\n"
399 "main: exiting\n"
400 msgstr ""
401 "$B< ./a.out>\n"
402 "main: swapcontext(&uctx_main, &uctx_func2)\n"
403 "func2: inițiată\n"
404 "func2: swapcontext(&uctx_func2, &uctx_func1)\n"
405 "func1: inițiată\n"
406 "func1: swapcontext(&uctx_func1, &uctx_func2)\n"
407 "func2: returnând\n"
408 "func1: returnând\n"
409 "main: se iese\n"
410
411 #. type: SS
412 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
413 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
414 #, no-wrap
415 msgid "Program source"
416 msgstr "Sursa programului"
417
418 #. type: Plain text
419 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
420 #: opensuse-tumbleweed
421 #, no-wrap
422 msgid ""
423 "#include E<lt>err.hE<gt>\n"
424 "#include E<lt>stdio.hE<gt>\n"
425 "#include E<lt>stdlib.hE<gt>\n"
426 "#include E<lt>ucontext.hE<gt>\n"
427 "\\&\n"
428 "static ucontext_t uctx_main, uctx_func1, uctx_func2;\n"
429 "\\&\n"
430 "static void\n"
431 "func1(void)\n"
432 "{\n"
433 " printf(\"%s: started\\[rs]n\", __func__);\n"
434 " printf(\"%s: swapcontext(&uctx_func1, &uctx_func2)\\[rs]n\", __func__);\n"
435 " if (swapcontext(&uctx_func1, &uctx_func2) == -1)\n"
436 " err(EXIT_FAILURE, \"swapcontext\");\n"
437 " printf(\"%s: returning\\[rs]n\", __func__);\n"
438 "}\n"
439 "\\&\n"
440 "static void\n"
441 "func2(void)\n"
442 "{\n"
443 " printf(\"%s: started\\[rs]n\", __func__);\n"
444 " printf(\"%s: swapcontext(&uctx_func2, &uctx_func1)\\[rs]n\", __func__);\n"
445 " if (swapcontext(&uctx_func2, &uctx_func1) == -1)\n"
446 " err(EXIT_FAILURE, \"swapcontext\");\n"
447 " printf(\"%s: returning\\[rs]n\", __func__);\n"
448 "}\n"
449 "\\&\n"
450 "int\n"
451 "main(int argc, char *argv[])\n"
452 "{\n"
453 " char func1_stack[16384];\n"
454 " char func2_stack[16384];\n"
455 "\\&\n"
456 " if (getcontext(&uctx_func1) == -1)\n"
457 " err(EXIT_FAILURE, \"getcontext\");\n"
458 " uctx_func1.uc_stack.ss_sp = func1_stack;\n"
459 " uctx_func1.uc_stack.ss_size = sizeof(func1_stack);\n"
460 " uctx_func1.uc_link = &uctx_main;\n"
461 " makecontext(&uctx_func1, func1, 0);\n"
462 "\\&\n"
463 " if (getcontext(&uctx_func2) == -1)\n"
464 " err(EXIT_FAILURE, \"getcontext\");\n"
465 " uctx_func2.uc_stack.ss_sp = func2_stack;\n"
466 " uctx_func2.uc_stack.ss_size = sizeof(func2_stack);\n"
467 " /* Successor context is f1(), unless argc E<gt> 1 */\n"
468 " uctx_func2.uc_link = (argc E<gt> 1) ? NULL : &uctx_func1;\n"
469 " makecontext(&uctx_func2, func2, 0);\n"
470 "\\&\n"
471 " printf(\"%s: swapcontext(&uctx_main, &uctx_func2)\\[rs]n\", __func__);\n"
472 " if (swapcontext(&uctx_main, &uctx_func2) == -1)\n"
473 " err(EXIT_FAILURE, \"swapcontext\");\n"
474 "\\&\n"
475 " printf(\"%s: exiting\\[rs]n\", __func__);\n"
476 " exit(EXIT_SUCCESS);\n"
477 "}\n"
478 msgstr ""
479 "#include E<lt>err.hE<gt>\n"
480 "#include E<lt>stdio.hE<gt>\n"
481 "#include E<lt>stdlib.hE<gt>\n"
482 "#include E<lt>ucontext.hE<gt>\n"
483 "\\&\n"
484 "static ucontext_t uctx_main, uctx_func1, uctx_func2;\n"
485 "\\&\n"
486 "#define handle_error(msg) \\[rs]\n"
487 " do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
488 "\\&\n"
489 "static void\n"
490 "func1(void)\n"
491 "{\n"
492 " printf(\"%s: inițiată\\[rs]n\", __func__);\n"
493 " printf(\"%s: swapcontext(&uctx_func1, &uctx_func2)\\[rs]n\", __func__);\n"
494 " if (swapcontext(&uctx_func1, &uctx_func2) == -1)\n"
495 " err(EXIT_FAILURE, \"swapcontext\");\n"
496 " printf(\"%s: returnând\\[rs]n\", __func__);\n"
497 "}\n"
498 "\\&\n"
499 "static void\n"
500 "func2(void)\n"
501 "{\n"
502 " printf(\"%s: inițiată\\[rs]n\", __func__);\n"
503 " printf(\"%s: swapcontext(&uctx_func2, &uctx_func1)\\[rs]n\", __func__);\n"
504 " if (swapcontext(&uctx_func2, &uctx_func1) == -1)\n"
505 " err(EXIT_FAILURE, \"swapcontext\");\n"
506 " printf(\"%s: returnând\\[rs]n\", __func__);\n"
507 "}\n"
508 "\\&\n"
509 "int\n"
510 "main(int argc, char *argv[])\n"
511 "{\n"
512 " char func1_stack[16384];\n"
513 " char func2_stack[16384];\n"
514 "\\&\n"
515 " if (getcontext(&uctx_func1) == -1)\n"
516 " err(EXIT_FAILURE, \"getcontext\");\n"
517 " uctx_func1.uc_stack.ss_sp = func1_stack;\n"
518 " uctx_func1.uc_stack.ss_size = sizeof(func1_stack);\n"
519 " uctx_func1.uc_link = &uctx_main;\n"
520 " makecontext(&uctx_func1, func1, 0);\n"
521 "\\&\n"
522 " if (getcontext(&uctx_func2) == -1)\n"
523 " err(EXIT_FAILURE, \"getcontext\");\n"
524 " uctx_func2.uc_stack.ss_sp = func2_stack;\n"
525 " uctx_func2.uc_stack.ss_size = sizeof(func2_stack);\n"
526 " /* Contextul succesor este f1(), cu excepția cazului în care argc E<gt> 1 */\n"
527 " uctx_func2.uc_link = (argc E<gt> 1) ? NULL : &uctx_func1;\n"
528 " makecontext(&uctx_func2, func2, 0);\n"
529 "\\&\n"
530 " printf(\"%s: swapcontext(&uctx_main, &uctx_func2)\\[rs]n\", __func__);\n"
531 " if (swapcontext(&uctx_main, &uctx_func2) == -1)\n"
532 " err(EXIT_FAILURE, \"swapcontext\");\n"
533 "\\&\n"
534 " printf(\"%s: se iese\\[rs]n\", __func__);\n"
535 " exit(EXIT_SUCCESS);\n"
536 "}\n"
537
538 #. SRC END
539 #. type: SH
540 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
541 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
542 #, no-wrap
543 msgid "SEE ALSO"
544 msgstr "CONSULTAȚI ȘI"
545
546 #. type: Plain text
547 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
548 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
549 msgid ""
550 "B<sigaction>(2), B<sigaltstack>(2), B<sigprocmask>(2), B<getcontext>(3), "
551 "B<sigsetjmp>(3)"
552 msgstr ""
553 "B<sigaction>(2), B<sigaltstack>(2), B<sigprocmask>(2), B<getcontext>(3), "
554 "B<sigsetjmp>(3)"
555
556 #. type: TH
557 #: debian-trixie
558 #, no-wrap
559 msgid "2024-06-15"
560 msgstr "15 iunie 2024"
561
562 #. type: TH
563 #: debian-trixie
564 #, no-wrap
565 msgid "Linux man-pages 6.9.1"
566 msgstr "Pagini de manual de Linux 6.9.1"
567
568 #. type: Plain text
569 #: debian-trixie
570 msgid "Standard C library (I<libc>, I<-lc>)"
571 msgstr "Biblioteca C standard (I<libc>, I<-lc>)"
572
573 #. type: Plain text
574 #: debian-trixie
575 #, no-wrap
576 msgid ""
577 "B<void makecontext(ucontext_t *>I<ucp>B<, void (*>I<func>B<)(), int >I<argc>B<, ...);>\n"
578 "B<int swapcontext(ucontext_t *restrict >I<oucp>B<,>\n"
579 "B< const ucontext_t *restrict >I<ucp>B<);>\n"
580 msgstr ""
581 "B<void makecontext(ucontext_t *>I<ucp>B<, void (*>I<func>B<)(), int >I<argc>B<, ...);>\n"
582 "B<int swapcontext(ucontext_t *restrict >I<oucp>B<,>\n"
583 "B< const ucontext_t *restrict >I<ucp>B<);>\n"
584
585 #. type: Plain text
586 #: debian-trixie fedora-44 fedora-rawhide
587 #, no-wrap
588 msgid ""
589 "#include E<lt>stdio.hE<gt>\n"
590 "#include E<lt>stdlib.hE<gt>\n"
591 "#include E<lt>ucontext.hE<gt>\n"
592 "\\&\n"
593 "static ucontext_t uctx_main, uctx_func1, uctx_func2;\n"
594 "\\&\n"
595 "#define handle_error(msg) \\[rs]\n"
596 " do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
597 "\\&\n"
598 "static void\n"
599 "func1(void)\n"
600 "{\n"
601 " printf(\"%s: started\\[rs]n\", __func__);\n"
602 " printf(\"%s: swapcontext(&uctx_func1, &uctx_func2)\\[rs]n\", __func__);\n"
603 " if (swapcontext(&uctx_func1, &uctx_func2) == -1)\n"
604 " handle_error(\"swapcontext\");\n"
605 " printf(\"%s: returning\\[rs]n\", __func__);\n"
606 "}\n"
607 "\\&\n"
608 "static void\n"
609 "func2(void)\n"
610 "{\n"
611 " printf(\"%s: started\\[rs]n\", __func__);\n"
612 " printf(\"%s: swapcontext(&uctx_func2, &uctx_func1)\\[rs]n\", __func__);\n"
613 " if (swapcontext(&uctx_func2, &uctx_func1) == -1)\n"
614 " handle_error(\"swapcontext\");\n"
615 " printf(\"%s: returning\\[rs]n\", __func__);\n"
616 "}\n"
617 "\\&\n"
618 "int\n"
619 "main(int argc, char *argv[])\n"
620 "{\n"
621 " char func1_stack[16384];\n"
622 " char func2_stack[16384];\n"
623 "\\&\n"
624 " if (getcontext(&uctx_func1) == -1)\n"
625 " handle_error(\"getcontext\");\n"
626 " uctx_func1.uc_stack.ss_sp = func1_stack;\n"
627 " uctx_func1.uc_stack.ss_size = sizeof(func1_stack);\n"
628 " uctx_func1.uc_link = &uctx_main;\n"
629 " makecontext(&uctx_func1, func1, 0);\n"
630 "\\&\n"
631 " if (getcontext(&uctx_func2) == -1)\n"
632 " handle_error(\"getcontext\");\n"
633 " uctx_func2.uc_stack.ss_sp = func2_stack;\n"
634 " uctx_func2.uc_stack.ss_size = sizeof(func2_stack);\n"
635 " /* Successor context is f1(), unless argc E<gt> 1 */\n"
636 " uctx_func2.uc_link = (argc E<gt> 1) ? NULL : &uctx_func1;\n"
637 " makecontext(&uctx_func2, func2, 0);\n"
638 "\\&\n"
639 " printf(\"%s: swapcontext(&uctx_main, &uctx_func2)\\[rs]n\", __func__);\n"
640 " if (swapcontext(&uctx_main, &uctx_func2) == -1)\n"
641 " handle_error(\"swapcontext\");\n"
642 "\\&\n"
643 " printf(\"%s: exiting\\[rs]n\", __func__);\n"
644 " exit(EXIT_SUCCESS);\n"
645 "}\n"
646 msgstr ""
647 "#include E<lt>stdio.hE<gt>\n"
648 "#include E<lt>stdlib.hE<gt>\n"
649 "#include E<lt>ucontext.hE<gt>\n"
650 "\\&\n"
651 "static ucontext_t uctx_main, uctx_func1, uctx_func2;\n"
652 "\\&\n"
653 "#define handle_error(msg) \\[rs]\n"
654 " do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
655 "\\&\n"
656 "static void\n"
657 "func1(void)\n"
658 "{\n"
659 " printf(\"%s: inițiată\\[rs]n\", __func__);\n"
660 " printf(\"%s: swapcontext(&uctx_func1, &uctx_func2)\\[rs]n\", __func__);\n"
661 " if (swapcontext(&uctx_func1, &uctx_func2) == -1)\n"
662 " handle_error(\"swapcontext\");\n"
663 " printf(\"%s: returnând\\[rs]n\", __func__);\n"
664 "}\n"
665 "\\&\n"
666 "static void\n"
667 "func2(void)\n"
668 "{\n"
669 " printf(\"%s: inișiată\\[rs]n\", __func__);\n"
670 " printf(\"%s: swapcontext(&uctx_func2, &uctx_func1)\\[rs]n\", __func__);\n"
671 " if (swapcontext(&uctx_func2, &uctx_func1) == -1)\n"
672 " handle_error(\"swapcontext\");\n"
673 " printf(\"%s: returnând\\[rs]n\", __func__);\n"
674 "}\n"
675 "\\&\n"
676 "int\n"
677 "main(int argc, char *argv[])\n"
678 "{\n"
679 " char func1_stack[16384];\n"
680 " char func2_stack[16384];\n"
681 "\\&\n"
682 " if (getcontext(&uctx_func1) == -1)\n"
683 " handle_error(\"getcontext\");\n"
684 " uctx_func1.uc_stack.ss_sp = func1_stack;\n"
685 " uctx_func1.uc_stack.ss_size = sizeof(func1_stack);\n"
686 " uctx_func1.uc_link = &uctx_main;\n"
687 " makecontext(&uctx_func1, func1, 0);\n"
688 "\\&\n"
689 " if (getcontext(&uctx_func2) == -1)\n"
690 " handle_error(\"getcontext\");\n"
691 " uctx_func2.uc_stack.ss_sp = func2_stack;\n"
692 " uctx_func2.uc_stack.ss_size = sizeof(func2_stack);\n"
693 " /* Contextul succesor este f1(), cu excepția cazului în care argc E<gt> 1 */\n"
694 " uctx_func2.uc_link = (argc E<gt> 1) ? NULL : &uctx_func1;\n"
695 " makecontext(&uctx_func2, func2, 0);\n"
696 "\\&\n"
697 " printf(\"%s: swapcontext(&uctx_main, &uctx_func2)\\[rs]n\", __func__);\n"
698 " if (swapcontext(&uctx_main, &uctx_func2) == -1)\n"
699 " handle_error(\"swapcontext\");\n"
700 "\\&\n"
701 " printf(\"%s: se iese\\[rs]n\", __func__);\n"
702 " exit(EXIT_SUCCESS);\n"
703 "}\n"
704
705 #. type: TH
706 #: fedora-44 fedora-rawhide
707 #, no-wrap
708 msgid "2024-12-13"
709 msgstr "13 decembrie 2024"
710
711 #. type: TH
712 #: fedora-44 fedora-rawhide
713 #, no-wrap
714 msgid "Linux man-pages 6.13"
715 msgstr "Pagini de manual de Linux 6.13"
716
717 #. type: TH
718 #: mageia-cauldron
719 #, no-wrap
720 msgid "Linux man-pages 6.17"
721 msgstr "Pagini de manual de Linux 6.17"
722
723 #. type: TH
724 #: opensuse-leap-16-1 opensuse-tumbleweed
725 #, no-wrap
726 msgid "Linux man-pages (unreleased)"
727 msgstr "Pagini de manual Linux (nepublicate)"