# Arabic translation of manpages # This file is distributed under the same license as the manpages-l10n package. # Copyright © of this file: # زايد السعيدي , 2026. msgid "" msgstr "" "Project-Id-Version: manpages-l10n 4.30.2\n" "POT-Creation-Date: 2026-06-05 06:30+0200\n" "PO-Revision-Date: 2026-06-02 19:32+0400\n" "Last-Translator: Zayed Al-Saidi \n" "Language-Team: Arabic \n" "Language: ar\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 " "&& n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n" "X-Generator: Lokalize 23.08.5\n" #. type: TH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "makecontext" msgstr "makecontext" #. type: TH #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed #, no-wrap msgid "2026-02-08" msgstr "8 فبراير 2026" #. type: TH #: archlinux debian-unstable #, no-wrap msgid "Linux man-pages 6.18" msgstr "صفحات دليل لينكس 6.18" #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "NAME" msgstr "الاسم" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "makecontext, swapcontext - manipulate user context" msgstr "makecontext, swapcontext - معالجة سياق المستخدم" #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "LIBRARY" msgstr "المكتبة" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron #: opensuse-leap-16-1 opensuse-tumbleweed msgid "Standard C library (I,\\ I<-lc>)" msgstr "مكتبة سي المعيارية (I،\\ I<-lc>)" #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "SYNOPSIS" msgstr "موجز" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "B<#include Eucontext.hE>\n" msgstr "B<#include Eucontext.hE>\n" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron #: opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "" "BIB<, typeof(void (int >IB<, ...)) *>IB<,>\n" "B< int >IB<, ...);>\n" "BIB<,>\n" "B< const ucontext_t *restrict >IB<);>\n" msgstr "" "BIB<, typeof(void (int >IB<, ...)) *>IB<,>\n" "B< int >IB<, ...);>\n" "BIB<,>\n" "B< const ucontext_t *restrict >IB<);>\n" #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "DESCRIPTION" msgstr "الوصف" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "In a System V-like environment, one has the type I (defined in " "Iucontext.hE> and described in B(3)) and the four " "functions B(3), B(3), B(), and " "B() that allow user-level context switching between multiple " "threads of control within a process." msgstr "" "في بيئة شبيهة بـ System V، يوجد النوع I (المُعرَّف في " "Iucontext.hE> والموصوف في B(3)) والدوال الأربع " "B(3) وB(3) وB() وB() التي " "تسمح بتبديل السياق على مستوى المستخدم بين خيوط تحكم متعددة داخل عملية." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "The B() function modifies the context pointed to by I " "(which was obtained from a call to B(3)). Before invoking " "B(), the caller must allocate a new stack for this context and " "assign its address to Iuc_stack>, and define a successor context " "and assign its address to Iuc_link>." msgstr "" "تعدّل الدالة B() السياق المُشار إليه بواسطة I (الذي حُصِل عليه " "من استدعاء B(3)). قبل استدعاء B()، يجب على المستدعي " "تخصيص مكدس جديد لهذا السياق وتعيين عنوانه إلى Iuc_stack>، وتعريف " "سياق خلف وتعيين عنوانه إلى Iuc_link>." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "When this context is later activated (using B(3) or " "B()) the function I is called, and passed the series of " "integer (I) arguments that follow I; the caller must specify the " "number of these arguments in I. When this function returns, the " "successor context is activated. If the successor context pointer is NULL, " "the thread exits." msgstr "" "عند تفعيل هذا السياق لاحقًا (باستخدام B(3) أو B())، " "تُستدعى الدالة I وتُمرَّر إليها سلسلة وسائط الأعداد الصحيحة (I) التي " "تلي I؛ يجب على المستدعي تحديد عدد هذه الوسائط في I. عند عودة هذه " "الدالة، يُفعَّل السياق الخلف. إذا كان مؤشر السياق الخلف NULL، يخرج الخيط." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "The B() function saves the current context in the structure " "pointed to by I, and then activates the context pointed to by I." msgstr "" "تحفظ الدالة B() السياق الحالي في البنية المُشار إليها بواسطة " "I، ثم تُفعِّل السياق المُشار إليه بواسطة I." #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "RETURN VALUE" msgstr "قيمة الإرجاع" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "When successful, B() does not return. (But we may return " "later, in case I is activated, in which case it looks like " "B() returns 0.) On error, B() returns -1 and " "sets I to indicate the error." msgstr "" "عند النجاح، لا تعود B(). (لكن قد نعود لاحقًا، في حالة تفعيل " "I، حيث يبدو أن B() تعيد 0.) عند الخطأ، تعيد " "B() -1 وتضبط I للإشارة إلى الخطأ." #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "ERRORS" msgstr "الأخطاء" #. type: TP #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "Insufficient stack space left." msgstr "مساحة مكدس متبقية غير كافية." #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "ATTRIBUTES" msgstr "السمات" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "For an explanation of the terms used in this section, see B(7)." msgstr "" "للاطلاع على شرح للمصطلحات المستخدمة في هذا القسم، انظر B(7)." #. type: tbl table #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "Interface" msgstr "الواجهة" #. type: tbl table #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "Attribute" msgstr "السمة" #. type: tbl table #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "Value" msgstr "القيمة" #. type: tbl table #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid ".na\n" msgstr ".na\n" #. type: tbl table #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid ".nh\n" msgstr ".nh\n" #. type: tbl table #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "B()" msgstr "B()" #. type: tbl table #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "Thread safety" msgstr "سلامة الخيوط" #. type: tbl table #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "MT-Safe race:ucp" msgstr "آمن للمسارات المتعددة (MT-Safe) سباق:ucp" #. type: tbl table #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "B()" msgstr "B()" #. type: tbl table #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "MT-Safe race:oucp race:ucp" msgstr "MT-Safe race:oucp race:ucp" #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "STANDARDS" msgstr "المعايير" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "None." msgstr "لا شيء." #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "HISTORY" msgstr "التاريخ" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "glibc 2.1. SUSv2, POSIX.1-2001. Removed in POSIX.1-2008, citing " "portability issues, and recommending that applications be rewritten to use " "POSIX threads instead." msgstr "" "glibc 2.1. SUSv2, POSIX.1-2001. أُزيل في POSIX.1-2008، مستشهدًا بمشاكل قابلية " "النقل، ويوصي بإعادة كتابة التطبيقات لاستخدام خيوط POSIX بدلاً من ذلك." #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "NOTES" msgstr "ملاحظات" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "The interpretation of Iuc_stack> is just as in B(2), " "namely, this struct contains the start and length of a memory area to be " "used as the stack, regardless of the direction of growth of the stack. " "Thus, it is not necessary for the user program to worry about this direction." msgstr "" "تفسير Iuc_stack> هو تمامًا كما في B(2)، أي أن هذه " "البنية تحتوي على بداية وطول منطقة ذاكرة لتُستخدم كمكدس، بغض النظر عن اتجاه " "نمو المكدس. وبالتالي، ليس من الضروري لبرنامج المستخدم القلق بشأن هذا الاتجاه." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "On architectures where I and pointer types are the same size (e.g., " "x86-32, where both types are 32 bits), you may be able to get away with " "passing pointers as arguments to B() following I. " "However, doing this is not guaranteed to be portable, is undefined according " "to the standards, and won't work on architectures where pointers are larger " "than Is. Nevertheless, starting with glibc 2.8, glibc makes some " "changes to B(), to permit this on some 64-bit architectures (e." "g., x86-64)." msgstr "" "في البنى حيث I وأنواع المؤشرات بنفس الحجم (مثل x86-32، حيث كلا النوعين " "32 بت)، قد تتمكن من تمرير المؤشرات كوسائط إلى B() بعد I. " "لكن، القيام بذلك غير مضمون ليكون محمولاً، وهو غير مُعرَّف وفقًا للمعايير، ولن " "يعمل في البنى حيث المؤشرات أكبر من I. ومع ذلك، بدءًا من glibc 2.8، أجرت " "glibc بعض التغييرات على B() للسماح بذلك في بعض البنى 64 بت (مثل " "x86-64)." #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "EXAMPLES" msgstr "أمثلة" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "The example program below demonstrates the use of B(3), " "B(), and B(). Running the program produces the " "following output:" msgstr "" "يوضح برنامج المثال أدناه استخدام B(3) وB() " "وB(). يؤدي تشغيل البرنامج إلى إخراج التالي:" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "" "$B< ./a.out>\n" "main: swapcontext(&uctx_main, &uctx_func2)\n" "func2: started\n" "func2: swapcontext(&uctx_func2, &uctx_func1)\n" "func1: started\n" "func1: swapcontext(&uctx_func1, &uctx_func2)\n" "func2: returning\n" "func1: returning\n" "main: exiting\n" msgstr "" "$B< ./a.out>\n" "main: swapcontext(&uctx_main, &uctx_func2)\n" "func2: started\n" "func2: swapcontext(&uctx_func2, &uctx_func1)\n" "func1: started\n" "func1: swapcontext(&uctx_func1, &uctx_func2)\n" "func2: returning\n" "func1: returning\n" "main: exiting\n" #. type: SS #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "Program source" msgstr "مصدر البرنامج" #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed #, no-wrap msgid "" "#include Eerr.hE\n" "#include Estdio.hE\n" "#include Estdlib.hE\n" "#include Eucontext.hE\n" "\\&\n" "static ucontext_t uctx_main, uctx_func1, uctx_func2;\n" "\\&\n" "static void\n" "func1(void)\n" "{\n" " printf(\"%s: started\\[rs]n\", __func__);\n" " printf(\"%s: swapcontext(&uctx_func1, &uctx_func2)\\[rs]n\", __func__);\n" " if (swapcontext(&uctx_func1, &uctx_func2) == -1)\n" " err(EXIT_FAILURE, \"swapcontext\");\n" " printf(\"%s: returning\\[rs]n\", __func__);\n" "}\n" "\\&\n" "static void\n" "func2(void)\n" "{\n" " printf(\"%s: started\\[rs]n\", __func__);\n" " printf(\"%s: swapcontext(&uctx_func2, &uctx_func1)\\[rs]n\", __func__);\n" " if (swapcontext(&uctx_func2, &uctx_func1) == -1)\n" " err(EXIT_FAILURE, \"swapcontext\");\n" " printf(\"%s: returning\\[rs]n\", __func__);\n" "}\n" "\\&\n" "int\n" "main(int argc, char *argv[])\n" "{\n" " char func1_stack[16384];\n" " char func2_stack[16384];\n" "\\&\n" " if (getcontext(&uctx_func1) == -1)\n" " err(EXIT_FAILURE, \"getcontext\");\n" " uctx_func1.uc_stack.ss_sp = func1_stack;\n" " uctx_func1.uc_stack.ss_size = sizeof(func1_stack);\n" " uctx_func1.uc_link = &uctx_main;\n" " makecontext(&uctx_func1, func1, 0);\n" "\\&\n" " if (getcontext(&uctx_func2) == -1)\n" " err(EXIT_FAILURE, \"getcontext\");\n" " uctx_func2.uc_stack.ss_sp = func2_stack;\n" " uctx_func2.uc_stack.ss_size = sizeof(func2_stack);\n" " /* Successor context is f1(), unless argc E 1 */\n" " uctx_func2.uc_link = (argc E 1) ? NULL : &uctx_func1;\n" " makecontext(&uctx_func2, func2, 0);\n" "\\&\n" " printf(\"%s: swapcontext(&uctx_main, &uctx_func2)\\[rs]n\", __func__);\n" " if (swapcontext(&uctx_main, &uctx_func2) == -1)\n" " err(EXIT_FAILURE, \"swapcontext\");\n" "\\&\n" " printf(\"%s: exiting\\[rs]n\", __func__);\n" " exit(EXIT_SUCCESS);\n" "}\n" msgstr "" "#include Eerr.hE\n" "#include Estdio.hE\n" "#include Estdlib.hE\n" "#include Eucontext.hE\n" "\\&\n" "static ucontext_t uctx_main, uctx_func1, uctx_func2;\n" "\\&\n" "static void\n" "func1(void)\n" "{\n" " printf(\"%s: started\\[rs]n\", __func__);\n" " printf(\"%s: swapcontext(&uctx_func1, &uctx_func2)\\[rs]n\", __func__);\n" " if (swapcontext(&uctx_func1, &uctx_func2) == -1)\n" " err(EXIT_FAILURE, \"swapcontext\");\n" " printf(\"%s: returning\\[rs]n\", __func__);\n" "}\n" "\\&\n" "static void\n" "func2(void)\n" "{\n" " printf(\"%s: started\\[rs]n\", __func__);\n" " printf(\"%s: swapcontext(&uctx_func2, &uctx_func1)\\[rs]n\", __func__);\n" " if (swapcontext(&uctx_func2, &uctx_func1) == -1)\n" " err(EXIT_FAILURE, \"swapcontext\");\n" " printf(\"%s: returning\\[rs]n\", __func__);\n" "}\n" "\\&\n" "int\n" "main(int argc, char *argv[])\n" "{\n" " char func1_stack[16384];\n" " char func2_stack[16384];\n" "\\&\n" " if (getcontext(&uctx_func1) == -1)\n" " err(EXIT_FAILURE, \"getcontext\");\n" " uctx_func1.uc_stack.ss_sp = func1_stack;\n" " uctx_func1.uc_stack.ss_size = sizeof(func1_stack);\n" " uctx_func1.uc_link = &uctx_main;\n" " makecontext(&uctx_func1, func1, 0);\n" "\\&\n" " if (getcontext(&uctx_func2) == -1)\n" " err(EXIT_FAILURE, \"getcontext\");\n" " uctx_func2.uc_stack.ss_sp = func2_stack;\n" " uctx_func2.uc_stack.ss_size = sizeof(func2_stack);\n" " /* Successor context is f1(), unless argc E 1 */\n" " uctx_func2.uc_link = (argc E 1) ? NULL : &uctx_func1;\n" " makecontext(&uctx_func2, func2, 0);\n" "\\&\n" " printf(\"%s: swapcontext(&uctx_main, &uctx_func2)\\[rs]n\", __func__);\n" " if (swapcontext(&uctx_main, &uctx_func2) == -1)\n" " err(EXIT_FAILURE, \"swapcontext\");\n" "\\&\n" " printf(\"%s: exiting\\[rs]n\", __func__);\n" " exit(EXIT_SUCCESS);\n" "}\n" #. SRC END #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "SEE ALSO" msgstr "انظر أيضًا" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "B(2), B(2), B(2), B(3), " "B(3)" msgstr "" "B(2), B(2), B(2), B(3), " "B(3)" #. type: TH #: debian-trixie #, no-wrap msgid "2024-06-15" msgstr "15 يونيو 2024" #. type: TH #: debian-trixie #, no-wrap msgid "Linux man-pages 6.9.1" msgstr "صفحات دليل لينكس 6.9.1" #. type: Plain text #: debian-trixie msgid "Standard C library (I, I<-lc>)" msgstr "مكتبة سي المعيارية (I، I<-lc>)" #. type: Plain text #: debian-trixie #, no-wrap msgid "" "BIB<, void (*>IB<)(), int >IB<, ...);>\n" "BIB<,>\n" "B< const ucontext_t *restrict >IB<);>\n" msgstr "" "BIB<, void (*>IB<)(), int >IB<, ...);>\n" "BIB<,>\n" "B< const ucontext_t *restrict >IB<);>\n" #. type: Plain text #: debian-trixie fedora-44 fedora-rawhide #, no-wrap msgid "" "#include Estdio.hE\n" "#include Estdlib.hE\n" "#include Eucontext.hE\n" "\\&\n" "static ucontext_t uctx_main, uctx_func1, uctx_func2;\n" "\\&\n" "#define handle_error(msg) \\[rs]\n" " do { perror(msg); exit(EXIT_FAILURE); } while (0)\n" "\\&\n" "static void\n" "func1(void)\n" "{\n" " printf(\"%s: started\\[rs]n\", __func__);\n" " printf(\"%s: swapcontext(&uctx_func1, &uctx_func2)\\[rs]n\", __func__);\n" " if (swapcontext(&uctx_func1, &uctx_func2) == -1)\n" " handle_error(\"swapcontext\");\n" " printf(\"%s: returning\\[rs]n\", __func__);\n" "}\n" "\\&\n" "static void\n" "func2(void)\n" "{\n" " printf(\"%s: started\\[rs]n\", __func__);\n" " printf(\"%s: swapcontext(&uctx_func2, &uctx_func1)\\[rs]n\", __func__);\n" " if (swapcontext(&uctx_func2, &uctx_func1) == -1)\n" " handle_error(\"swapcontext\");\n" " printf(\"%s: returning\\[rs]n\", __func__);\n" "}\n" "\\&\n" "int\n" "main(int argc, char *argv[])\n" "{\n" " char func1_stack[16384];\n" " char func2_stack[16384];\n" "\\&\n" " if (getcontext(&uctx_func1) == -1)\n" " handle_error(\"getcontext\");\n" " uctx_func1.uc_stack.ss_sp = func1_stack;\n" " uctx_func1.uc_stack.ss_size = sizeof(func1_stack);\n" " uctx_func1.uc_link = &uctx_main;\n" " makecontext(&uctx_func1, func1, 0);\n" "\\&\n" " if (getcontext(&uctx_func2) == -1)\n" " handle_error(\"getcontext\");\n" " uctx_func2.uc_stack.ss_sp = func2_stack;\n" " uctx_func2.uc_stack.ss_size = sizeof(func2_stack);\n" " /* Successor context is f1(), unless argc E 1 */\n" " uctx_func2.uc_link = (argc E 1) ? NULL : &uctx_func1;\n" " makecontext(&uctx_func2, func2, 0);\n" "\\&\n" " printf(\"%s: swapcontext(&uctx_main, &uctx_func2)\\[rs]n\", __func__);\n" " if (swapcontext(&uctx_main, &uctx_func2) == -1)\n" " handle_error(\"swapcontext\");\n" "\\&\n" " printf(\"%s: exiting\\[rs]n\", __func__);\n" " exit(EXIT_SUCCESS);\n" "}\n" msgstr "" "#include Estdio.hE\n" "#include Estdlib.hE\n" "#include Eucontext.hE\n" "\\&\n" "static ucontext_t uctx_main, uctx_func1, uctx_func2;\n" "\\&\n" "#define handle_error(msg) \\[rs]\n" " do { perror(msg); exit(EXIT_FAILURE); } while (0)\n" "\\&\n" "static void\n" "func1(void)\n" "{\n" " printf(\"%s: started\\[rs]n\", __func__);\n" " printf(\"%s: swapcontext(&uctx_func1, &uctx_func2)\\[rs]n\", __func__);\n" " if (swapcontext(&uctx_func1, &uctx_func2) == -1)\n" " handle_error(\"swapcontext\");\n" " printf(\"%s: returning\\[rs]n\", __func__);\n" "}\n" "\\&\n" "static void\n" "func2(void)\n" "{\n" " printf(\"%s: started\\[rs]n\", __func__);\n" " printf(\"%s: swapcontext(&uctx_func2, &uctx_func1)\\[rs]n\", __func__);\n" " if (swapcontext(&uctx_func2, &uctx_func1) == -1)\n" " handle_error(\"swapcontext\");\n" " printf(\"%s: returning\\[rs]n\", __func__);\n" "}\n" "\\&\n" "int\n" "main(int argc, char *argv[])\n" "{\n" " char func1_stack[16384];\n" " char func2_stack[16384];\n" "\\&\n" " if (getcontext(&uctx_func1) == -1)\n" " handle_error(\"getcontext\");\n" " uctx_func1.uc_stack.ss_sp = func1_stack;\n" " uctx_func1.uc_stack.ss_size = sizeof(func1_stack);\n" " uctx_func1.uc_link = &uctx_main;\n" " makecontext(&uctx_func1, func1, 0);\n" "\\&\n" " if (getcontext(&uctx_func2) == -1)\n" " handle_error(\"getcontext\");\n" " uctx_func2.uc_stack.ss_sp = func2_stack;\n" " uctx_func2.uc_stack.ss_size = sizeof(func2_stack);\n" " /* Successor context is f1(), unless argc E 1 */\n" " uctx_func2.uc_link = (argc E 1) ? NULL : &uctx_func1;\n" " makecontext(&uctx_func2, func2, 0);\n" "\\&\n" " printf(\"%s: swapcontext(&uctx_main, &uctx_func2)\\[rs]n\", __func__);\n" " if (swapcontext(&uctx_main, &uctx_func2) == -1)\n" " handle_error(\"swapcontext\");\n" "\\&\n" " printf(\"%s: exiting\\[rs]n\", __func__);\n" " exit(EXIT_SUCCESS);\n" "}\n" #. type: TH #: fedora-44 fedora-rawhide #, no-wrap msgid "2024-12-13" msgstr "13 ديسمبر 2024" #. type: TH #: fedora-44 fedora-rawhide #, no-wrap msgid "Linux man-pages 6.13" msgstr "صفحات دليل لينكس 6.13" #. type: TH #: mageia-cauldron #, no-wrap msgid "Linux man-pages 6.17" msgstr "صفحات دليل لينكس 6.17" #. type: TH #: opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "Linux man-pages (unreleased)" msgstr "صفحات دليل لينكس (لم تصدر بعد)"