Debian Codegraph @

po/ar/man3/makecontext.3.po

raw
1 # Arabic translation of manpages
2 # This file is distributed under the same license as the manpages-l10n package.
3 # Copyright © of this file:
4 # زايد السعيدي <[email protected]>, 2026.
5 msgid ""
6 msgstr ""
7 "Project-Id-Version: manpages-l10n 4.30.2\n"
8 "POT-Creation-Date: 2026-06-05 06:30+0200\n"
9 "PO-Revision-Date: 2026-06-02 19:32+0400\n"
10 "Last-Translator: Zayed Al-Saidi <[email protected]>\n"
11 "Language-Team: Arabic <[email protected]>\n"
12 "Language: ar\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=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 "
17 "&& n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n"
18 "X-Generator: Lokalize 23.08.5\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 فبراير 2026"
33
34 #. type: TH
35 #: archlinux debian-unstable
36 #, no-wrap
37 msgid "Linux man-pages 6.18"
38 msgstr "صفحات دليل لينكس 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 "الاسم"
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 - معالجة سياق المستخدم"
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 "المكتبة"
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 "مكتبة سي المعيارية (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 "موجز"
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 "الوصف"
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 "في بيئة شبيهة بـ System V، يوجد النوع I<ucontext_t> (المُعرَّف في "
113 "I<E<lt>ucontext.hE<gt>> والموصوف في B<getcontext>(3)) والدوال الأربع "
114 "B<getcontext>(3) وB<setcontext>(3) وB<makecontext>() وB<swapcontext>() التي "
115 "تسمح بتبديل السياق على مستوى المستخدم بين خيوط تحكم متعددة داخل عملية."
116
117 #. type: Plain text
118 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
119 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
120 msgid ""
121 "The B<makecontext>() function modifies the context pointed to by I<ucp> "
122 "(which was obtained from a call to B<getcontext>(3)). Before invoking "
123 "B<makecontext>(), the caller must allocate a new stack for this context and "
124 "assign its address to I<ucp-E<gt>uc_stack>, and define a successor context "
125 "and assign its address to I<ucp-E<gt>uc_link>."
126 msgstr ""
127 "تعدّل الدالة B<makecontext>() السياق المُشار إليه بواسطة I<ucp> (الذي حُصِل عليه "
128 "من استدعاء B<getcontext>(3)). قبل استدعاء B<makecontext>()، يجب على المستدعي "
129 "تخصيص مكدس جديد لهذا السياق وتعيين عنوانه إلى I<ucp-E<gt>uc_stack>، وتعريف "
130 "سياق خلف وتعيين عنوانه إلى I<ucp-E<gt>uc_link>."
131
132 #. type: Plain text
133 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
134 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
135 msgid ""
136 "When this context is later activated (using B<setcontext>(3) or "
137 "B<swapcontext>()) the function I<func> is called, and passed the series of "
138 "integer (I<int>) arguments that follow I<argc>; the caller must specify the "
139 "number of these arguments in I<argc>. When this function returns, the "
140 "successor context is activated. If the successor context pointer is NULL, "
141 "the thread exits."
142 msgstr ""
143 "عند تفعيل هذا السياق لاحقًا (باستخدام B<setcontext>(3) أو B<swapcontext>())، "
144 "تُستدعى الدالة I<func> وتُمرَّر إليها سلسلة وسائط الأعداد الصحيحة (I<int>) التي "
145 "تلي I<argc>؛ يجب على المستدعي تحديد عدد هذه الوسائط في I<argc>. عند عودة هذه "
146 "الدالة، يُفعَّل السياق الخلف. إذا كان مؤشر السياق الخلف NULL، يخرج الخيط."
147
148 #. type: Plain text
149 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
150 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
151 msgid ""
152 "The B<swapcontext>() function saves the current context in the structure "
153 "pointed to by I<oucp>, and then activates the context pointed to by I<ucp>."
154 msgstr ""
155 "تحفظ الدالة B<swapcontext>() السياق الحالي في البنية المُشار إليها بواسطة "
156 "I<oucp>، ثم تُفعِّل السياق المُشار إليه بواسطة I<ucp>."
157
158 #. type: SH
159 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
160 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
161 #, no-wrap
162 msgid "RETURN VALUE"
163 msgstr "قيمة الإرجاع"
164
165 #. type: Plain text
166 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
167 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
168 msgid ""
169 "When successful, B<swapcontext>() does not return. (But we may return "
170 "later, in case I<oucp> is activated, in which case it looks like "
171 "B<swapcontext>() returns 0.) On error, B<swapcontext>() returns -1 and "
172 "sets I<errno> to indicate the error."
173 msgstr ""
174 "عند النجاح، لا تعود B<swapcontext>(). (لكن قد نعود لاحقًا، في حالة تفعيل "
175 "I<oucp>، حيث يبدو أن B<swapcontext>() تعيد 0.) عند الخطأ، تعيد "
176 "B<swapcontext>() -1 وتضبط I<errno> للإشارة إلى الخطأ."
177
178 #. type: SH
179 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
180 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
181 #, no-wrap
182 msgid "ERRORS"
183 msgstr "الأخطاء"
184
185 #. type: TP
186 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
187 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
188 #, no-wrap
189 msgid "B<ENOMEM>"
190 msgstr "B<ENOMEM>"
191
192 #. type: Plain text
193 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
194 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
195 msgid "Insufficient stack space left."
196 msgstr "مساحة مكدس متبقية غير كافية."
197
198 #. type: SH
199 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
200 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
201 #, no-wrap
202 msgid "ATTRIBUTES"
203 msgstr "السمات"
204
205 #. type: Plain text
206 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
207 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
208 msgid ""
209 "For an explanation of the terms used in this section, see B<attributes>(7)."
210 msgstr ""
211 "للاطلاع على شرح للمصطلحات المستخدمة في هذا القسم، انظر B<attributes>(7)."
212
213 #. type: tbl table
214 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
215 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
216 #, no-wrap
217 msgid "Interface"
218 msgstr "الواجهة"
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 "Attribute"
225 msgstr "السمة"
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 "Value"
232 msgstr "القيمة"
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 ".na\n"
239 msgstr ".na\n"
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 ".nh\n"
246 msgstr ".nh\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 "B<makecontext>()"
253 msgstr "B<makecontext>()"
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 "Thread safety"
260 msgstr "سلامة الخيوط"
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 "MT-Safe race:ucp"
267 msgstr "آمن للمسارات المتعددة (MT-Safe) سباق:ucp"
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 "B<swapcontext>()"
274 msgstr "B<swapcontext>()"
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 "MT-Safe race:oucp race:ucp"
281 msgstr "MT-Safe race:oucp race:ucp"
282
283 #. type: SH
284 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
285 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
286 #, no-wrap
287 msgid "STANDARDS"
288 msgstr "المعايير"
289
290 #. type: Plain text
291 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
292 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
293 msgid "None."
294 msgstr "لا شيء."
295
296 #. type: SH
297 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
298 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
299 #, no-wrap
300 msgid "HISTORY"
301 msgstr "التاريخ"
302
303 #. type: Plain text
304 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
305 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
306 msgid ""
307 "glibc 2.1. SUSv2, POSIX.1-2001. Removed in POSIX.1-2008, citing "
308 "portability issues, and recommending that applications be rewritten to use "
309 "POSIX threads instead."
310 msgstr ""
311 "glibc 2.1. SUSv2, POSIX.1-2001. أُزيل في POSIX.1-2008، مستشهدًا بمشاكل قابلية "
312 "النقل، ويوصي بإعادة كتابة التطبيقات لاستخدام خيوط POSIX بدلاً من ذلك."
313
314 #. type: SH
315 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
316 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
317 #, no-wrap
318 msgid "NOTES"
319 msgstr "ملاحظات"
320
321 #. type: Plain text
322 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
323 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
324 msgid ""
325 "The interpretation of I<ucp-E<gt>uc_stack> is just as in B<sigaltstack>(2), "
326 "namely, this struct contains the start and length of a memory area to be "
327 "used as the stack, regardless of the direction of growth of the stack. "
328 "Thus, it is not necessary for the user program to worry about this direction."
329 msgstr ""
330 "تفسير I<ucp-E<gt>uc_stack> هو تمامًا كما في B<sigaltstack>(2)، أي أن هذه "
331 "البنية تحتوي على بداية وطول منطقة ذاكرة لتُستخدم كمكدس، بغض النظر عن اتجاه "
332 "نمو المكدس. وبالتالي، ليس من الضروري لبرنامج المستخدم القلق بشأن هذا الاتجاه."
333
334 #. type: Plain text
335 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
336 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
337 msgid ""
338 "On architectures where I<int> and pointer types are the same size (e.g., "
339 "x86-32, where both types are 32 bits), you may be able to get away with "
340 "passing pointers as arguments to B<makecontext>() following I<argc>. "
341 "However, doing this is not guaranteed to be portable, is undefined according "
342 "to the standards, and won't work on architectures where pointers are larger "
343 "than I<int>s. Nevertheless, starting with glibc 2.8, glibc makes some "
344 "changes to B<makecontext>(), to permit this on some 64-bit architectures (e."
345 "g., x86-64)."
346 msgstr ""
347 "في البنى حيث I<int> وأنواع المؤشرات بنفس الحجم (مثل x86-32، حيث كلا النوعين "
348 "32 بت)، قد تتمكن من تمرير المؤشرات كوسائط إلى B<makecontext>() بعد I<argc>. "
349 "لكن، القيام بذلك غير مضمون ليكون محمولاً، وهو غير مُعرَّف وفقًا للمعايير، ولن "
350 "يعمل في البنى حيث المؤشرات أكبر من I<int>. ومع ذلك، بدءًا من glibc 2.8، أجرت "
351 "glibc بعض التغييرات على B<makecontext>() للسماح بذلك في بعض البنى 64 بت (مثل "
352 "x86-64)."
353
354 #. type: SH
355 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
356 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
357 #, no-wrap
358 msgid "EXAMPLES"
359 msgstr "أمثلة"
360
361 #. type: Plain text
362 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
363 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
364 msgid ""
365 "The example program below demonstrates the use of B<getcontext>(3), "
366 "B<makecontext>(), and B<swapcontext>(). Running the program produces the "
367 "following output:"
368 msgstr ""
369 "يوضح برنامج المثال أدناه استخدام B<getcontext>(3) وB<makecontext>() "
370 "وB<swapcontext>(). يؤدي تشغيل البرنامج إلى إخراج التالي:"
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 "مصدر البرنامج"
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 "#include E<lt>err.hE<gt>\n"
466 "#include E<lt>stdio.hE<gt>\n"
467 "#include E<lt>stdlib.hE<gt>\n"
468 "#include E<lt>ucontext.hE<gt>\n"
469 "\\&\n"
470 "static ucontext_t uctx_main, uctx_func1, uctx_func2;\n"
471 "\\&\n"
472 "static void\n"
473 "func1(void)\n"
474 "{\n"
475 " printf(\"%s: started\\[rs]n\", __func__);\n"
476 " printf(\"%s: swapcontext(&uctx_func1, &uctx_func2)\\[rs]n\", __func__);\n"
477 " if (swapcontext(&uctx_func1, &uctx_func2) == -1)\n"
478 " err(EXIT_FAILURE, \"swapcontext\");\n"
479 " printf(\"%s: returning\\[rs]n\", __func__);\n"
480 "}\n"
481 "\\&\n"
482 "static void\n"
483 "func2(void)\n"
484 "{\n"
485 " printf(\"%s: started\\[rs]n\", __func__);\n"
486 " printf(\"%s: swapcontext(&uctx_func2, &uctx_func1)\\[rs]n\", __func__);\n"
487 " if (swapcontext(&uctx_func2, &uctx_func1) == -1)\n"
488 " err(EXIT_FAILURE, \"swapcontext\");\n"
489 " printf(\"%s: returning\\[rs]n\", __func__);\n"
490 "}\n"
491 "\\&\n"
492 "int\n"
493 "main(int argc, char *argv[])\n"
494 "{\n"
495 " char func1_stack[16384];\n"
496 " char func2_stack[16384];\n"
497 "\\&\n"
498 " if (getcontext(&uctx_func1) == -1)\n"
499 " err(EXIT_FAILURE, \"getcontext\");\n"
500 " uctx_func1.uc_stack.ss_sp = func1_stack;\n"
501 " uctx_func1.uc_stack.ss_size = sizeof(func1_stack);\n"
502 " uctx_func1.uc_link = &uctx_main;\n"
503 " makecontext(&uctx_func1, func1, 0);\n"
504 "\\&\n"
505 " if (getcontext(&uctx_func2) == -1)\n"
506 " err(EXIT_FAILURE, \"getcontext\");\n"
507 " uctx_func2.uc_stack.ss_sp = func2_stack;\n"
508 " uctx_func2.uc_stack.ss_size = sizeof(func2_stack);\n"
509 " /* Successor context is f1(), unless argc E<gt> 1 */\n"
510 " uctx_func2.uc_link = (argc E<gt> 1) ? NULL : &uctx_func1;\n"
511 " makecontext(&uctx_func2, func2, 0);\n"
512 "\\&\n"
513 " printf(\"%s: swapcontext(&uctx_main, &uctx_func2)\\[rs]n\", __func__);\n"
514 " if (swapcontext(&uctx_main, &uctx_func2) == -1)\n"
515 " err(EXIT_FAILURE, \"swapcontext\");\n"
516 "\\&\n"
517 " printf(\"%s: exiting\\[rs]n\", __func__);\n"
518 " exit(EXIT_SUCCESS);\n"
519 "}\n"
520
521 #. SRC END
522 #. type: SH
523 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
524 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
525 #, no-wrap
526 msgid "SEE ALSO"
527 msgstr "انظر أيضًا"
528
529 #. type: Plain text
530 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
531 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
532 msgid ""
533 "B<sigaction>(2), B<sigaltstack>(2), B<sigprocmask>(2), B<getcontext>(3), "
534 "B<sigsetjmp>(3)"
535 msgstr ""
536 "B<sigaction>(2), B<sigaltstack>(2), B<sigprocmask>(2), B<getcontext>(3), "
537 "B<sigsetjmp>(3)"
538
539 #. type: TH
540 #: debian-trixie
541 #, no-wrap
542 msgid "2024-06-15"
543 msgstr "15 يونيو 2024"
544
545 #. type: TH
546 #: debian-trixie
547 #, no-wrap
548 msgid "Linux man-pages 6.9.1"
549 msgstr "صفحات دليل لينكس 6.9.1"
550
551 #. type: Plain text
552 #: debian-trixie
553 msgid "Standard C library (I<libc>, I<-lc>)"
554 msgstr "مكتبة سي المعيارية (I<libc>، I<-lc>)"
555
556 #. type: Plain text
557 #: debian-trixie
558 #, no-wrap
559 msgid ""
560 "B<void makecontext(ucontext_t *>I<ucp>B<, void (*>I<func>B<)(), int >I<argc>B<, ...);>\n"
561 "B<int swapcontext(ucontext_t *restrict >I<oucp>B<,>\n"
562 "B< const ucontext_t *restrict >I<ucp>B<);>\n"
563 msgstr ""
564 "B<void makecontext(ucontext_t *>I<ucp>B<, void (*>I<func>B<)(), int >I<argc>B<, ...);>\n"
565 "B<int swapcontext(ucontext_t *restrict >I<oucp>B<,>\n"
566 "B< const ucontext_t *restrict >I<ucp>B<);>\n"
567
568 #. type: Plain text
569 #: debian-trixie fedora-44 fedora-rawhide
570 #, no-wrap
571 msgid ""
572 "#include E<lt>stdio.hE<gt>\n"
573 "#include E<lt>stdlib.hE<gt>\n"
574 "#include E<lt>ucontext.hE<gt>\n"
575 "\\&\n"
576 "static ucontext_t uctx_main, uctx_func1, uctx_func2;\n"
577 "\\&\n"
578 "#define handle_error(msg) \\[rs]\n"
579 " do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
580 "\\&\n"
581 "static void\n"
582 "func1(void)\n"
583 "{\n"
584 " printf(\"%s: started\\[rs]n\", __func__);\n"
585 " printf(\"%s: swapcontext(&uctx_func1, &uctx_func2)\\[rs]n\", __func__);\n"
586 " if (swapcontext(&uctx_func1, &uctx_func2) == -1)\n"
587 " handle_error(\"swapcontext\");\n"
588 " printf(\"%s: returning\\[rs]n\", __func__);\n"
589 "}\n"
590 "\\&\n"
591 "static void\n"
592 "func2(void)\n"
593 "{\n"
594 " printf(\"%s: started\\[rs]n\", __func__);\n"
595 " printf(\"%s: swapcontext(&uctx_func2, &uctx_func1)\\[rs]n\", __func__);\n"
596 " if (swapcontext(&uctx_func2, &uctx_func1) == -1)\n"
597 " handle_error(\"swapcontext\");\n"
598 " printf(\"%s: returning\\[rs]n\", __func__);\n"
599 "}\n"
600 "\\&\n"
601 "int\n"
602 "main(int argc, char *argv[])\n"
603 "{\n"
604 " char func1_stack[16384];\n"
605 " char func2_stack[16384];\n"
606 "\\&\n"
607 " if (getcontext(&uctx_func1) == -1)\n"
608 " handle_error(\"getcontext\");\n"
609 " uctx_func1.uc_stack.ss_sp = func1_stack;\n"
610 " uctx_func1.uc_stack.ss_size = sizeof(func1_stack);\n"
611 " uctx_func1.uc_link = &uctx_main;\n"
612 " makecontext(&uctx_func1, func1, 0);\n"
613 "\\&\n"
614 " if (getcontext(&uctx_func2) == -1)\n"
615 " handle_error(\"getcontext\");\n"
616 " uctx_func2.uc_stack.ss_sp = func2_stack;\n"
617 " uctx_func2.uc_stack.ss_size = sizeof(func2_stack);\n"
618 " /* Successor context is f1(), unless argc E<gt> 1 */\n"
619 " uctx_func2.uc_link = (argc E<gt> 1) ? NULL : &uctx_func1;\n"
620 " makecontext(&uctx_func2, func2, 0);\n"
621 "\\&\n"
622 " printf(\"%s: swapcontext(&uctx_main, &uctx_func2)\\[rs]n\", __func__);\n"
623 " if (swapcontext(&uctx_main, &uctx_func2) == -1)\n"
624 " handle_error(\"swapcontext\");\n"
625 "\\&\n"
626 " printf(\"%s: exiting\\[rs]n\", __func__);\n"
627 " exit(EXIT_SUCCESS);\n"
628 "}\n"
629 msgstr ""
630 "#include E<lt>stdio.hE<gt>\n"
631 "#include E<lt>stdlib.hE<gt>\n"
632 "#include E<lt>ucontext.hE<gt>\n"
633 "\\&\n"
634 "static ucontext_t uctx_main, uctx_func1, uctx_func2;\n"
635 "\\&\n"
636 "#define handle_error(msg) \\[rs]\n"
637 " do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
638 "\\&\n"
639 "static void\n"
640 "func1(void)\n"
641 "{\n"
642 " printf(\"%s: started\\[rs]n\", __func__);\n"
643 " printf(\"%s: swapcontext(&uctx_func1, &uctx_func2)\\[rs]n\", __func__);\n"
644 " if (swapcontext(&uctx_func1, &uctx_func2) == -1)\n"
645 " handle_error(\"swapcontext\");\n"
646 " printf(\"%s: returning\\[rs]n\", __func__);\n"
647 "}\n"
648 "\\&\n"
649 "static void\n"
650 "func2(void)\n"
651 "{\n"
652 " printf(\"%s: started\\[rs]n\", __func__);\n"
653 " printf(\"%s: swapcontext(&uctx_func2, &uctx_func1)\\[rs]n\", __func__);\n"
654 " if (swapcontext(&uctx_func2, &uctx_func1) == -1)\n"
655 " handle_error(\"swapcontext\");\n"
656 " printf(\"%s: returning\\[rs]n\", __func__);\n"
657 "}\n"
658 "\\&\n"
659 "int\n"
660 "main(int argc, char *argv[])\n"
661 "{\n"
662 " char func1_stack[16384];\n"
663 " char func2_stack[16384];\n"
664 "\\&\n"
665 " if (getcontext(&uctx_func1) == -1)\n"
666 " handle_error(\"getcontext\");\n"
667 " uctx_func1.uc_stack.ss_sp = func1_stack;\n"
668 " uctx_func1.uc_stack.ss_size = sizeof(func1_stack);\n"
669 " uctx_func1.uc_link = &uctx_main;\n"
670 " makecontext(&uctx_func1, func1, 0);\n"
671 "\\&\n"
672 " if (getcontext(&uctx_func2) == -1)\n"
673 " handle_error(\"getcontext\");\n"
674 " uctx_func2.uc_stack.ss_sp = func2_stack;\n"
675 " uctx_func2.uc_stack.ss_size = sizeof(func2_stack);\n"
676 " /* Successor context is f1(), unless argc E<gt> 1 */\n"
677 " uctx_func2.uc_link = (argc E<gt> 1) ? NULL : &uctx_func1;\n"
678 " makecontext(&uctx_func2, func2, 0);\n"
679 "\\&\n"
680 " printf(\"%s: swapcontext(&uctx_main, &uctx_func2)\\[rs]n\", __func__);\n"
681 " if (swapcontext(&uctx_main, &uctx_func2) == -1)\n"
682 " handle_error(\"swapcontext\");\n"
683 "\\&\n"
684 " printf(\"%s: exiting\\[rs]n\", __func__);\n"
685 " exit(EXIT_SUCCESS);\n"
686 "}\n"
687
688 #. type: TH
689 #: fedora-44 fedora-rawhide
690 #, no-wrap
691 msgid "2024-12-13"
692 msgstr "13 ديسمبر 2024"
693
694 #. type: TH
695 #: fedora-44 fedora-rawhide
696 #, no-wrap
697 msgid "Linux man-pages 6.13"
698 msgstr "صفحات دليل لينكس 6.13"
699
700 #. type: TH
701 #: mageia-cauldron
702 #, no-wrap
703 msgid "Linux man-pages 6.17"
704 msgstr "صفحات دليل لينكس 6.17"
705
706 #. type: TH
707 #: opensuse-leap-16-1 opensuse-tumbleweed
708 #, no-wrap
709 msgid "Linux man-pages (unreleased)"
710 msgstr "صفحات دليل لينكس (لم تصدر بعد)"