Debian Codegraph @

po/ru/man3/makecontext.3.po

raw
1 # Russian translation of manpages
2 # This file is distributed under the same license as the manpages-l10n package.
3 # Copyright © of this file:
4 # aereiae <[email protected]>, 2014.
5 # Alexey <[email protected]>, 2015.
6 # Azamat Hackimov <[email protected]>, 2013-2017.
7 # Dmitriy S. Seregin <[email protected]>, 2013.
8 # Dmitry Bolkhovskikh <[email protected]>, 2017.
9 # ITriskTI <[email protected]>, 2013.
10 # Max Is <[email protected]>, 2016.
11 # Yuri Kozlov <[email protected]>, 2011-2019.
12 # Иван Павлов <[email protected]>, 2017.
13 # Малянов Евгений Викторович <[email protected]>, 2014.
14 msgid ""
15 msgstr ""
16 "Project-Id-Version: manpages-l10n\n"
17 "POT-Creation-Date: 2026-06-05 06:30+0200\n"
18 "PO-Revision-Date: 2024-12-21 19:50+0300\n"
19 "Last-Translator: Yuri Kozlov <[email protected]>\n"
20 "Language-Team: Russian <[email protected]>\n"
21 "Language: ru\n"
22 "MIME-Version: 1.0\n"
23 "Content-Type: text/plain; charset=UTF-8\n"
24 "Content-Transfer-Encoding: 8bit\n"
25 "Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && "
26 "n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || "
27 "(n%100>=11 && n%100<=14)? 2 : 3);\n"
28 "X-Generator: Lokalize 2.0\n"
29
30 #. type: TH
31 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
32 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
33 #, fuzzy, no-wrap
34 #| msgid "B<makecontext>()"
35 msgid "makecontext"
36 msgstr "B<makecontext>()"
37
38 #. type: TH
39 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
40 #: opensuse-tumbleweed
41 #, no-wrap
42 msgid "2026-02-08"
43 msgstr "8 февраля 2026 г."
44
45 #. type: TH
46 #: archlinux debian-unstable
47 #, fuzzy, no-wrap
48 #| msgid "Linux man-pages 6.17"
49 msgid "Linux man-pages 6.18"
50 msgstr "Справочные страницы Linux 6.17"
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 "NAME"
57 msgstr "НАИМЕНОВАНИЕ"
58
59 #. type: Plain text
60 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
61 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
62 msgid "makecontext, swapcontext - manipulate user context"
63 msgstr "makecontext, swapcontext - управляет пользовательским контекстом"
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 "LIBRARY"
70 msgstr "БИБЛИОТЕКА"
71
72 #. type: Plain text
73 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
74 #: opensuse-leap-16-1 opensuse-tumbleweed
75 msgid "Standard C library (I<libc>,\\ I<-lc>)"
76 msgstr "Стандартная библиотека языка C (I<libc>,\\ I<-lc>)"
77
78 #. type: SH
79 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
80 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
81 #, no-wrap
82 msgid "SYNOPSIS"
83 msgstr "СИНТАКСИС"
84
85 #. type: Plain text
86 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
87 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
88 #, no-wrap
89 msgid "B<#include E<lt>ucontext.hE<gt>>\n"
90 msgstr "B<#include E<lt>ucontext.hE<gt>>\n"
91
92 #. type: Plain text
93 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
94 #: opensuse-leap-16-1 opensuse-tumbleweed
95 #, fuzzy, no-wrap
96 #| msgid "B<void makecontext(ucontext_t *>I<ucp>B<, void (*>I<func>B<)(),> B<int >I<argc>B<, ...);>"
97 msgid ""
98 "B<void makecontext(ucontext_t *>I<ucp>B<, typeof(void (int >I<arg0>B<, ...)) *>I<func>B<,>\n"
99 "B< int >I<argc>B<, ...);>\n"
100 "B<int swapcontext(ucontext_t *restrict >I<oucp>B<,>\n"
101 "B< const ucontext_t *restrict >I<ucp>B<);>\n"
102 msgstr "B<void makecontext(ucontext_t *>I<ucp>B<, void (*>I<func>B<)(),> B<int >I<argc>B<, ...);>"
103
104 #. type: SH
105 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
106 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
107 #, no-wrap
108 msgid "DESCRIPTION"
109 msgstr "ОПИСАНИЕ"
110
111 #. type: Plain text
112 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
113 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
114 #, fuzzy
115 #| msgid ""
116 #| "In a System V-like environment, one has the type I<ucontext_t> defined in "
117 #| "I<E<lt>ucontext.hE<gt>> and the four functions B<getcontext>(3), "
118 #| "B<setcontext>(3), B<makecontext>() and B<swapcontext>() that allow user-"
119 #| "level context switching between multiple threads of control within a "
120 #| "process."
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 "В окружении, подобном SysV, имеется тип данных I<mcontext_t>, определённый в "
129 "файле I<E<lt>ucontext.hE<gt>>, и четыре функции — B<getcontext>(3), "
130 "B<setcontext>(3), B<makecontext>() и B<swapcontext>(), которые позволяют "
131 "контексту пользовательского уровня переключаться между несколькими нитями "
132 "внутри одного процесса."
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 "Функция B<makecontext>() изменяет контекст, на который указывает I<ucp> "
145 "(полученный из вызова B<getcontext>(3)). Перед вызовом B<makecontext>(), "
146 "вызывающий должен выделить новый стек для этого контекста и присвоить его "
147 "адрес I<ucp-E<gt>uc_stack>, и определить последующий контекст и присвоить "
148 "его адрес 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 "Позднее, когда этот контекст активируется (с помощью B<setcontext>(3) или "
162 "B<swapcontext>()), вызывается функция I<func> и ей передаётся набор "
163 "целочисленных аргументов (I<int>), указанных после I<argc>; вызывающий "
164 "должен указать количество этих аргументов в I<argc>. После возврата из "
165 "функции активируется последующий контекст. Если указатель последующего "
166 "контекста равен NULL, то нить завершается."
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 "Функция B<swapcontext>() сохраняет текущий контекст в структуру, на которую "
176 "указывает I<oucp>, и после этого активирует контекст, на который указывает "
177 "I<ucp>."
178
179 #. type: SH
180 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
181 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
182 #, no-wrap
183 msgid "RETURN VALUE"
184 msgstr "ВОЗВРАЩАЕМОЕ ЗНАЧЕНИЕ"
185
186 #. type: Plain text
187 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
188 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
189 #, fuzzy
190 #| msgid ""
191 #| "When successful, B<swapcontext>() does not return. (But we may return "
192 #| "later, in case I<oucp> is activated, in which case it looks like "
193 #| "B<swapcontext>() returns 0.) On error, B<swapcontext>() returns -1 and "
194 #| "sets I<errno> appropriately."
195 msgid ""
196 "When successful, B<swapcontext>() does not return. (But we may return "
197 "later, in case I<oucp> is activated, in which case it looks like "
198 "B<swapcontext>() returns 0.) On error, B<swapcontext>() returns -1 and "
199 "sets I<errno> to indicate the error."
200 msgstr ""
201 "При успешном выполнении B<swapcontext>() не возвращает выполнение (но мы "
202 "можем вернуться позднее при активации I<oucp> и это будет выглядеть как если "
203 "бы B<swapcontext>() вернула 0). При ошибке B<swapcontext>() возвращает -1 и "
204 "изменяет I<errno> соответствующим образом."
205
206 #. type: SH
207 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
208 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
209 #, no-wrap
210 msgid "ERRORS"
211 msgstr "ОШИБКИ"
212
213 #. type: TP
214 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
215 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
216 #, no-wrap
217 msgid "B<ENOMEM>"
218 msgstr "B<ENOMEM>"
219
220 #. type: Plain text
221 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
222 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
223 msgid "Insufficient stack space left."
224 msgstr "Осталось недостаточно стекового пространства."
225
226 #. type: SH
227 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
228 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
229 #, no-wrap
230 msgid "ATTRIBUTES"
231 msgstr "АТРИБУТЫ"
232
233 #. type: Plain text
234 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
235 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
236 msgid ""
237 "For an explanation of the terms used in this section, see B<attributes>(7)."
238 msgstr "Описание терминов данного раздела смотрите в B<attributes>(7)."
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 "Interface"
245 msgstr "Интерфейс"
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 "Attribute"
252 msgstr "Атрибут"
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 "Value"
259 msgstr "Значение"
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 ".na\n"
266 msgstr ".na\n"
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 #, no-wrap
272 msgid ".nh\n"
273 msgstr ".nh\n"
274
275 #. type: tbl table
276 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
277 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
278 #, no-wrap
279 msgid "B<makecontext>()"
280 msgstr "B<makecontext>()"
281
282 #. type: tbl table
283 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
284 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
285 #, no-wrap
286 msgid "Thread safety"
287 msgstr "Безвредность в нитях"
288
289 #. type: tbl table
290 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
291 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
292 #, no-wrap
293 msgid "MT-Safe race:ucp"
294 msgstr "MT-Safe race:ucp"
295
296 #. type: tbl table
297 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
298 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
299 #, no-wrap
300 msgid "B<swapcontext>()"
301 msgstr "B<swapcontext>()"
302
303 #. type: tbl table
304 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
305 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
306 #, no-wrap
307 msgid "MT-Safe race:oucp race:ucp"
308 msgstr "MT-Safe race:oucp race:ucp"
309
310 #. type: SH
311 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
312 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
313 #, no-wrap
314 msgid "STANDARDS"
315 msgstr "СТАНДАРТЫ"
316
317 #. type: Plain text
318 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
319 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
320 msgid "None."
321 msgstr "Отсутствуют."
322
323 #. type: SH
324 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
325 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
326 #, no-wrap
327 msgid "HISTORY"
328 msgstr "ИСТОРИЯ"
329
330 #. type: Plain text
331 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
332 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
333 #, fuzzy
334 #| msgid ""
335 #| "SUSv2, POSIX.1-2001. POSIX.1-2008 removes the specifications of "
336 #| "B<makecontext>() and B<swapcontext>(), citing portability issues, and "
337 #| "recommending that applications be rewritten to use POSIX threads instead."
338 msgid ""
339 "glibc 2.1. SUSv2, POSIX.1-2001. Removed in POSIX.1-2008, citing "
340 "portability issues, and recommending that applications be rewritten to use "
341 "POSIX threads instead."
342 msgstr ""
343 "SUSv2, POSIX.1-2001. В POSIX.1-2008 удалены определения B<makecontext>() и "
344 "B<swapcontext>() со ссылкой на проблемы с переносимостью и рекомендацией "
345 "переписать приложение с использование нитей POSIX."
346
347 #. type: SH
348 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
349 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
350 #, no-wrap
351 msgid "NOTES"
352 msgstr "ПРИМЕЧАНИЯ"
353
354 #. type: Plain text
355 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
356 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
357 msgid ""
358 "The interpretation of I<ucp-E<gt>uc_stack> is just as in B<sigaltstack>(2), "
359 "namely, this struct contains the start and length of a memory area to be "
360 "used as the stack, regardless of the direction of growth of the stack. "
361 "Thus, it is not necessary for the user program to worry about this direction."
362 msgstr ""
363 "Назначение I<ucp-E<gt>uc_stack> подобно описанному в B<sigaltstack>(2), а "
364 "именно: данная структура содержит начало и размер области памяти, которая "
365 "будет использоваться как стек, независимо от направления роста стека. То "
366 "есть, в пользовательской программе нет необходимости учитывать это "
367 "направление."
368
369 #. type: Plain text
370 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
371 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
372 #, fuzzy
373 #| msgid ""
374 #| "On architectures where I<int> and pointer types are the same size (e.g., "
375 #| "x86-32, where both types are 32 bits), you may be able to get away with "
376 #| "passing pointers as arguments to B<makecontext>() following I<argc>. "
377 #| "However, doing this is not guaranteed to be portable, is undefined "
378 #| "according to the standards, and won't work on architectures where "
379 #| "pointers are larger than I<int>s. Nevertheless, starting with version "
380 #| "2.8, glibc makes some changes to B<makecontext>(), to permit this on some "
381 #| "64-bit architectures (e.g., x86-64)."
382 msgid ""
383 "On architectures where I<int> and pointer types are the same size (e.g., "
384 "x86-32, where both types are 32 bits), you may be able to get away with "
385 "passing pointers as arguments to B<makecontext>() following I<argc>. "
386 "However, doing this is not guaranteed to be portable, is undefined according "
387 "to the standards, and won't work on architectures where pointers are larger "
388 "than I<int>s. Nevertheless, starting with glibc 2.8, glibc makes some "
389 "changes to B<makecontext>(), to permit this on some 64-bit architectures "
390 "(e.g., x86-64)."
391 msgstr ""
392 "В архитектурах, где тип I<int> и указатель имеют одинаковый размер "
393 "(например, x86-32, оба типа имеют размер 32 бита), вы можете передавать "
394 "указатели в аргументах B<makecontext>() после I<argc>. Однако, это не "
395 "гарантирует переносимость, не определено в стандарте и не работает на "
396 "архитектурах, где указатели больше I<int>. Тем не менее, начиная с версии "
397 "2.8, в glibc внесены изменения в B<makecontext>(), которые позволяют это и "
398 "на некоторых 64-битных архитектурах (например, x86-64)."
399
400 #. type: SH
401 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
402 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
403 #, no-wrap
404 msgid "EXAMPLES"
405 msgstr "ПРИМЕРЫ"
406
407 #. type: Plain text
408 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
409 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
410 msgid ""
411 "The example program below demonstrates the use of B<getcontext>(3), "
412 "B<makecontext>(), and B<swapcontext>(). Running the program produces the "
413 "following output:"
414 msgstr ""
415 "В программе, показанной далее, демонстрируется использование "
416 "B<getcontext>(3), B<makecontext>() и B<swapcontext>(). Вот результат запуска "
417 "этой программы:"
418
419 #. type: Plain text
420 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
421 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
422 #, no-wrap
423 msgid ""
424 "$B< ./a.out>\n"
425 "main: swapcontext(&uctx_main, &uctx_func2)\n"
426 "func2: started\n"
427 "func2: swapcontext(&uctx_func2, &uctx_func1)\n"
428 "func1: started\n"
429 "func1: swapcontext(&uctx_func1, &uctx_func2)\n"
430 "func2: returning\n"
431 "func1: returning\n"
432 "main: exiting\n"
433 msgstr ""
434 "$B< ./a.out>\n"
435 "main: swapcontext(&uctx_main, &uctx_func2)\n"
436 "func2: запущена\n"
437 "func2: swapcontext(&uctx_func2, &uctx_func1)\n"
438 "func1: запущена\n"
439 "func1: swapcontext(&uctx_func1, &uctx_func2)\n"
440 "func2: возврат\n"
441 "func1: возврат\n"
442 "main: выход\n"
443
444 #. type: SS
445 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
446 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
447 #, no-wrap
448 msgid "Program source"
449 msgstr "Исходный код программы"
450
451 #. type: Plain text
452 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
453 #: opensuse-tumbleweed
454 #, no-wrap
455 msgid ""
456 "#include E<lt>err.hE<gt>\n"
457 "#include E<lt>stdio.hE<gt>\n"
458 "#include E<lt>stdlib.hE<gt>\n"
459 "#include E<lt>ucontext.hE<gt>\n"
460 "\\&\n"
461 "static ucontext_t uctx_main, uctx_func1, uctx_func2;\n"
462 "\\&\n"
463 "static void\n"
464 "func1(void)\n"
465 "{\n"
466 " printf(\"%s: started\\[rs]n\", __func__);\n"
467 " printf(\"%s: swapcontext(&uctx_func1, &uctx_func2)\\[rs]n\", __func__);\n"
468 " if (swapcontext(&uctx_func1, &uctx_func2) == -1)\n"
469 " err(EXIT_FAILURE, \"swapcontext\");\n"
470 " printf(\"%s: returning\\[rs]n\", __func__);\n"
471 "}\n"
472 "\\&\n"
473 "static void\n"
474 "func2(void)\n"
475 "{\n"
476 " printf(\"%s: started\\[rs]n\", __func__);\n"
477 " printf(\"%s: swapcontext(&uctx_func2, &uctx_func1)\\[rs]n\", __func__);\n"
478 " if (swapcontext(&uctx_func2, &uctx_func1) == -1)\n"
479 " err(EXIT_FAILURE, \"swapcontext\");\n"
480 " printf(\"%s: returning\\[rs]n\", __func__);\n"
481 "}\n"
482 "\\&\n"
483 "int\n"
484 "main(int argc, char *argv[])\n"
485 "{\n"
486 " char func1_stack[16384];\n"
487 " char func2_stack[16384];\n"
488 "\\&\n"
489 " if (getcontext(&uctx_func1) == -1)\n"
490 " err(EXIT_FAILURE, \"getcontext\");\n"
491 " uctx_func1.uc_stack.ss_sp = func1_stack;\n"
492 " uctx_func1.uc_stack.ss_size = sizeof(func1_stack);\n"
493 " uctx_func1.uc_link = &uctx_main;\n"
494 " makecontext(&uctx_func1, func1, 0);\n"
495 "\\&\n"
496 " if (getcontext(&uctx_func2) == -1)\n"
497 " err(EXIT_FAILURE, \"getcontext\");\n"
498 " uctx_func2.uc_stack.ss_sp = func2_stack;\n"
499 " uctx_func2.uc_stack.ss_size = sizeof(func2_stack);\n"
500 " /* Successor context is f1(), unless argc E<gt> 1 */\n"
501 " uctx_func2.uc_link = (argc E<gt> 1) ? NULL : &uctx_func1;\n"
502 " makecontext(&uctx_func2, func2, 0);\n"
503 "\\&\n"
504 " printf(\"%s: swapcontext(&uctx_main, &uctx_func2)\\[rs]n\", __func__);\n"
505 " if (swapcontext(&uctx_main, &uctx_func2) == -1)\n"
506 " err(EXIT_FAILURE, \"swapcontext\");\n"
507 "\\&\n"
508 " printf(\"%s: exiting\\[rs]n\", __func__);\n"
509 " exit(EXIT_SUCCESS);\n"
510 "}\n"
511 msgstr ""
512
513 #. SRC END
514 #. type: SH
515 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
516 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
517 #, no-wrap
518 msgid "SEE ALSO"
519 msgstr "СМОТРИТЕ ТАКЖЕ"
520
521 #. type: Plain text
522 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
523 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
524 msgid ""
525 "B<sigaction>(2), B<sigaltstack>(2), B<sigprocmask>(2), B<getcontext>(3), "
526 "B<sigsetjmp>(3)"
527 msgstr ""
528 "B<sigaction>(2), B<sigaltstack>(2), B<sigprocmask>(2), B<getcontext>(3), "
529 "B<sigsetjmp>(3)"
530
531 #. type: TH
532 #: debian-trixie
533 #, no-wrap
534 msgid "2024-06-15"
535 msgstr "15 июня 2024 г."
536
537 #. type: TH
538 #: debian-trixie
539 #, no-wrap
540 msgid "Linux man-pages 6.9.1"
541 msgstr "Страницы руководства Linux 6.9.1"
542
543 #. type: Plain text
544 #: debian-trixie
545 msgid "Standard C library (I<libc>, I<-lc>)"
546 msgstr "Стандартная библиотека языка C (I<libc>, I<-lc>)"
547
548 #. type: Plain text
549 #: debian-trixie
550 #, fuzzy, no-wrap
551 #| msgid "B<void makecontext(ucontext_t *>I<ucp>B<, void (*>I<func>B<)(),> B<int >I<argc>B<, ...);>"
552 msgid ""
553 "B<void makecontext(ucontext_t *>I<ucp>B<, void (*>I<func>B<)(), int >I<argc>B<, ...);>\n"
554 "B<int swapcontext(ucontext_t *restrict >I<oucp>B<,>\n"
555 "B< const ucontext_t *restrict >I<ucp>B<);>\n"
556 msgstr "B<void makecontext(ucontext_t *>I<ucp>B<, void (*>I<func>B<)(),> B<int >I<argc>B<, ...);>"
557
558 #. type: Plain text
559 #: debian-trixie fedora-44 fedora-rawhide
560 #, no-wrap
561 msgid ""
562 "#include E<lt>stdio.hE<gt>\n"
563 "#include E<lt>stdlib.hE<gt>\n"
564 "#include E<lt>ucontext.hE<gt>\n"
565 "\\&\n"
566 "static ucontext_t uctx_main, uctx_func1, uctx_func2;\n"
567 "\\&\n"
568 "#define handle_error(msg) \\[rs]\n"
569 " do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
570 "\\&\n"
571 "static void\n"
572 "func1(void)\n"
573 "{\n"
574 " printf(\"%s: started\\[rs]n\", __func__);\n"
575 " printf(\"%s: swapcontext(&uctx_func1, &uctx_func2)\\[rs]n\", __func__);\n"
576 " if (swapcontext(&uctx_func1, &uctx_func2) == -1)\n"
577 " handle_error(\"swapcontext\");\n"
578 " printf(\"%s: returning\\[rs]n\", __func__);\n"
579 "}\n"
580 "\\&\n"
581 "static void\n"
582 "func2(void)\n"
583 "{\n"
584 " printf(\"%s: started\\[rs]n\", __func__);\n"
585 " printf(\"%s: swapcontext(&uctx_func2, &uctx_func1)\\[rs]n\", __func__);\n"
586 " if (swapcontext(&uctx_func2, &uctx_func1) == -1)\n"
587 " handle_error(\"swapcontext\");\n"
588 " printf(\"%s: returning\\[rs]n\", __func__);\n"
589 "}\n"
590 "\\&\n"
591 "int\n"
592 "main(int argc, char *argv[])\n"
593 "{\n"
594 " char func1_stack[16384];\n"
595 " char func2_stack[16384];\n"
596 "\\&\n"
597 " if (getcontext(&uctx_func1) == -1)\n"
598 " handle_error(\"getcontext\");\n"
599 " uctx_func1.uc_stack.ss_sp = func1_stack;\n"
600 " uctx_func1.uc_stack.ss_size = sizeof(func1_stack);\n"
601 " uctx_func1.uc_link = &uctx_main;\n"
602 " makecontext(&uctx_func1, func1, 0);\n"
603 "\\&\n"
604 " if (getcontext(&uctx_func2) == -1)\n"
605 " handle_error(\"getcontext\");\n"
606 " uctx_func2.uc_stack.ss_sp = func2_stack;\n"
607 " uctx_func2.uc_stack.ss_size = sizeof(func2_stack);\n"
608 " /* Successor context is f1(), unless argc E<gt> 1 */\n"
609 " uctx_func2.uc_link = (argc E<gt> 1) ? NULL : &uctx_func1;\n"
610 " makecontext(&uctx_func2, func2, 0);\n"
611 "\\&\n"
612 " printf(\"%s: swapcontext(&uctx_main, &uctx_func2)\\[rs]n\", __func__);\n"
613 " if (swapcontext(&uctx_main, &uctx_func2) == -1)\n"
614 " handle_error(\"swapcontext\");\n"
615 "\\&\n"
616 " printf(\"%s: exiting\\[rs]n\", __func__);\n"
617 " exit(EXIT_SUCCESS);\n"
618 "}\n"
619 msgstr ""
620
621 #. type: TH
622 #: fedora-44 fedora-rawhide
623 #, no-wrap
624 msgid "2024-12-13"
625 msgstr "13 декабря 2024 г."
626
627 #. type: TH
628 #: fedora-44 fedora-rawhide
629 #, no-wrap
630 msgid "Linux man-pages 6.13"
631 msgstr "Страницы руководства Linux 6.13"
632
633 #. type: TH
634 #: mageia-cauldron
635 #, no-wrap
636 msgid "Linux man-pages 6.17"
637 msgstr "Страницы руководства Linux 6.17"
638
639 #. type: TH
640 #: opensuse-leap-16-1 opensuse-tumbleweed
641 #, no-wrap
642 msgid "Linux man-pages (unreleased)"
643 msgstr "Страницы руководства Linux (не выпущены)"