# 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:38+0200\n" "PO-Revision-Date: 2026-06-03 06:42+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 "pthread_setaffinity_np" msgstr "pthread_setaffinity_np" #. type: TH #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed #, no-wrap msgid "2025-09-21" msgstr "21 سبتمبر 2025" #. 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 "" "pthread_setaffinity_np, pthread_getaffinity_np - set/get CPU affinity of a " "thread" msgstr "" "pthread_setaffinity_np, pthread_getaffinity_np - ضبط/الحصول على تقارب وحدة " "المعالجة المركزية لخيط" #. 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 "POSIX threads library (I,\\ I<-lpthread>)" msgstr "مكتبة مسالك POSIX (I،\\ I<-lpthread>)" #. 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<#define _GNU_SOURCE> /* See feature_test_macros(7) */\n" "B<#include Epthread.hE>\n" msgstr "" "B<#define _GNU_SOURCE> /* انظر feature_test_macros(7) */\n" "B<#include Epthread.hE>\n" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "" "BIB<, size_t >IB<,>\n" "B< const cpu_set_t *>IB<);>\n" "BIB<, size_t >IB<,>\n" "B< cpu_set_t *>IB<);>\n" msgstr "" "BIB<, size_t >IB<,>\n" "B< const cpu_set_t *>IB<);>\n" "BIB<, size_t >IB<,>\n" "B< cpu_set_t *>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 "" "The B() function sets the CPU affinity mask of the " "thread I to the CPU set pointed to by I. If the call is " "successful, and the thread is not currently running on one of the CPUs in " "I, then it is migrated to one of those CPUs." msgstr "" "تضبط الدالة B() قناع تقارب وحدة المعالجة المركزية " "للخيط I إلى مجموعة وحدة المعالجة المركزية المشار إليها بواسطة " "I. إذا نجحت الاستدعاء، ولم يكن الخيط يعمل حاليًا على إحدى وحدات " "المعالجة المركزية في I، فسيُهاجر إلى إحدى تلك الوحدات." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "The B() function returns the CPU affinity mask of " "the thread I in the buffer pointed to by I." msgstr "" "تُرجع الدالة B() قناع تقارب وحدة المعالجة المركزية " "للخيط I في المخزن المؤقت المشار إليه بواسطة I." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "For more details on CPU affinity masks, see B(2). For a " "description of a set of macros that can be used to manipulate and inspect " "CPU sets, see B(3)." msgstr "" "لمزيد من التفاصيل حول أقنعة تقارب المعالج (CPU affinity masks)، راجع " "B(2). لوصف لمجموعة من الماكرو التي يمكن استخدامها لمعالجة " "وفحص مجموعات المعالجات، راجع B(3)." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "The argument I is the length (in bytes) of the buffer pointed to " "by I. Typically, this argument would be specified as " "I. (It may be some other value, if using the macros " "described in B(3) for dynamically allocating a CPU set.)" msgstr "" "الوسيطة I هي طول (بالبايت) المخزن المؤقت المشار إليه بواسطة " "I. عادةً، تُحدد هذه الوسيطة كـ I. (قد تكون قيمة " "أخرى، إذا استُخدمت وحدات الماكرو الموصوفة في B(3) للتخصيص الديناميكي " "لمجموعة وحدة المعالجة المركزية.)" #. 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 "" "On success, these functions return 0; on error, they return a nonzero error " "number." msgstr "" "عند النجاح، تُعيد هذه الدوال القيمة 0؛ وعند الخطأ، تُعيد رقم خطأ غير صفري." #. 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 "A supplied memory address was invalid." 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 "" "(B()) The affinity bit mask I contains no " "processors that are currently physically on the system and permitted to the " "thread according to any restrictions that may be imposed by the \"cpuset\" " "mechanism described in B(7)." msgstr "" "(B()) لا يحتوي قناع البتات للتقارب I على أي " "معالجات موجودة فعليًا حاليًا على النظام ومسموح بها للخيط وفقًا لأي قيود قد تُفرض " "بواسطة آلية \"cpuset\" الموصوفة في B(7)." #. cpumask_t #. The raw sched_getaffinity() system call returns the size (in bytes) #. of the cpumask_t type. #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "(B()) I specified a CPU that was outside " "the set supported by the kernel. (The kernel configuration option " "B defines the range of the set supported by the kernel data " "type used to represent CPU sets.)" msgstr "" "(B()) حدد I وحدة معالجة مركزية خارج المجموعة " "المدعومة من النواة. (يُعرف خيار تهيئة النواة B نطاق المجموعة " "المدعومة من نوع بيانات النواة المستخدم لتمثيل مجموعات وحدة المعالجة " "المركزية.)" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "(B()) I is smaller than the size of the " "affinity mask used by the kernel." msgstr "" "(B()) I أصغر من حجم قناع التقارب " "المستخدم من النواة." #. 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 "No thread with the ID I could be found." msgstr "تعذر العثور على أي خيط بالمعرف I." #. 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(),\n" "B()" msgstr "" "B(),\n" "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" msgstr "MT-Safe" #. 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 "GNU; hence the suffix \"_np\" (nonportable) in the names." msgstr "جنو؛ ومن هنا جاءت اللاحقة \"_np\" (غير منقول) في الأسماء." #. 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.3.4." msgstr "glibc 2.3.4." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "In glibc 2.3.3 only, versions of these functions were provided that did not " "have a I argument. Instead the CPU set size given to the " "underlying system calls was always I." msgstr "" "في إصدار glibc 2.3.3 فقط، توفرت نسخ من هذه الدوال لم تكن تحتوي على معطى " "I. بدلاً من ذلك، كان حجم مجموعة وحدة المعالجة المركزية المعطى " "لنداءات النظام الأساسية هو دائماً I." #. 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 "" "After a call to B(), the set of CPUs on which the " "thread will actually run is the intersection of the set specified in the " "I argument and the set of CPUs actually present on the system. The " "system may further restrict the set of CPUs on which the thread runs if the " "\"cpuset\" mechanism described in B(7) is being used. These " "restrictions on the actual set of CPUs on which the thread will run are " "silently imposed by the kernel." msgstr "" "بعد استدعاء B()، تكون مجموعة وحدات المعالجة المركزية " "التي سيعمل عليها الخيط فعليًا هي تقاطع المجموعة المحددة في الوسيطة I " "ومجموعة وحدات المعالجة المركزية الموجودة فعليًا على النظام. قد يُقيد النظام " "أيضًا مجموعة وحدات المعالجة المركزية التي يعمل عليها الخيط إذا استُخدمت آلية " "\"cpuset\" الموصوفة في B(7). تُفرض هذه القيود على المجموعة الفعلية " "لوحدات المعالجة المركزية التي سيعمل عليها الخيط بصمت من النواة." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "These functions are implemented on top of the B(2) and " "B(2) system calls." msgstr "" "تُنفذ هذه الدوال فوق استدعاءات النظام B(2) و " "B(2)." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "A new thread created by B(3) inherits a copy of its " "creator's CPU affinity mask." msgstr "" "يرث خيط جديد مُنشأ بواسطة B(3) نسخة من قناع تقارب وحدة " "المعالجة المركزية لمنشئه." #. 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 "" "In the following program, the main thread uses B() " "to set its CPU affinity mask to include CPUs 0 to 7 (which may not all be " "available on the system), and then calls B() to " "check the resulting CPU affinity mask of the thread." msgstr "" "في البرنامج التالي، يستخدم الخيط الرئيسي B() لضبط " "قناع تقارب وحدة المعالجة المركزية ليشمل وحدات المعالجة المركزية 0 إلى 7 (قد " "لا تكون جميعها متاحة على النظام)، ثم يستدعي B() " "للتحقق من قناع تقارب وحدة المعالجة المركزية الناتج للخيط." #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed #, no-wrap msgid "" "#define _GNU_SOURCE\n" "#include Eerr.hE\n" "#include Epthread.hE\n" "#include Esched.hE\n" "#include Estdio.hE\n" "#include Estdlib.hE\n" "\\&\n" "int\n" "main(void)\n" "{\n" " int s;\n" " cpu_set_t cpuset;\n" " pthread_t thread;\n" "\\&\n" " thread = pthread_self();\n" "\\&\n" " /* Set affinity mask to include CPUs 0 to 7. */\n" "\\&\n" " CPU_ZERO(&cpuset);\n" " for (size_t j = 0; j E 8; j++)\n" " CPU_SET(j, &cpuset);\n" "\\&\n" " s = pthread_setaffinity_np(thread, sizeof(cpuset), &cpuset);\n" " if (s != 0)\n" " errc(EXIT_FAILURE, s, \"pthread_setaffinity_np\");\n" "\\&\n" " /* Check the actual affinity mask assigned to the thread. */\n" "\\&\n" " s = pthread_getaffinity_np(thread, sizeof(cpuset), &cpuset);\n" " if (s != 0)\n" " errc(EXIT_FAILURE, s, \"pthread_getaffinity_np\");\n" "\\&\n" " printf(\"Set returned by pthread_getaffinity_np() contained:\\[rs]n\");\n" " for (size_t j = 0; j E CPU_SETSIZE; j++)\n" " if (CPU_ISSET(j, &cpuset))\n" " printf(\" CPU %zu\\[rs]n\", j);\n" "\\&\n" " exit(EXIT_SUCCESS);\n" "}\n" msgstr "" "#define _GNU_SOURCE\n" "#include Eerr.hE\n" "#include Epthread.hE\n" "#include Esched.hE\n" "#include Estdio.hE\n" "#include Estdlib.hE\n" "\\&\n" "int\n" "main(void)\n" "{\n" " int s;\n" " cpu_set_t cpuset;\n" " pthread_t thread;\n" "\\&\n" " thread = pthread_self();\n" "\\&\n" " /* Set affinity mask to include CPUs 0 to 7. */\n" "\\&\n" " CPU_ZERO(&cpuset);\n" " for (size_t j = 0; j E 8; j++)\n" " CPU_SET(j, &cpuset);\n" "\\&\n" " s = pthread_setaffinity_np(thread, sizeof(cpuset), &cpuset);\n" " if (s != 0)\n" " errc(EXIT_FAILURE, s, \"pthread_setaffinity_np\");\n" "\\&\n" " /* Check the actual affinity mask assigned to the thread. */\n" "\\&\n" " s = pthread_getaffinity_np(thread, sizeof(cpuset), &cpuset);\n" " if (s != 0)\n" " errc(EXIT_FAILURE, s, \"pthread_getaffinity_np\");\n" "\\&\n" " printf(\"Set returned by pthread_getaffinity_np() contained:\\[rs]n\");\n" " for (size_t j = 0; j E CPU_SETSIZE; j++)\n" " if (CPU_ISSET(j, &cpuset))\n" " printf(\" CPU %zu\\[rs]n\", j);\n" "\\&\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(3), B(3), " "B(3), B(3), B(7), B(7), " "B(7)" msgstr "" "B(2), B(3), B(3), " "B(3), B(3), B(7), B(7), " "B(7)" #. 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 "POSIX threads library (I, I<-lpthread>)" msgstr "مكتبة مسالك POSIX (I، I<-lpthread>)" #. type: Plain text #: debian-trixie #, no-wrap msgid "" "#define _GNU_SOURCE\n" "#include Eerr.hE\n" "#include Eerrno.hE\n" "#include Epthread.hE\n" "#include Estdio.hE\n" "#include Estdlib.hE\n" "\\&\n" "int\n" "main(void)\n" "{\n" " int s;\n" " cpu_set_t cpuset;\n" " pthread_t thread;\n" "\\&\n" " thread = pthread_self();\n" "\\&\n" " /* Set affinity mask to include CPUs 0 to 7. */\n" "\\&\n" " CPU_ZERO(&cpuset);\n" " for (size_t j = 0; j E 8; j++)\n" " CPU_SET(j, &cpuset);\n" "\\&\n" " s = pthread_setaffinity_np(thread, sizeof(cpuset), &cpuset);\n" " if (s != 0)\n" " errc(EXIT_FAILURE, s, \"pthread_setaffinity_np\");\n" "\\&\n" " /* Check the actual affinity mask assigned to the thread. */\n" "\\&\n" " s = pthread_getaffinity_np(thread, sizeof(cpuset), &cpuset);\n" " if (s != 0)\n" " errc(EXIT_FAILURE, s, \"pthread_getaffinity_np\");\n" "\\&\n" " printf(\"Set returned by pthread_getaffinity_np() contained:\\[rs]n\");\n" " for (size_t j = 0; j E CPU_SETSIZE; j++)\n" " if (CPU_ISSET(j, &cpuset))\n" " printf(\" CPU %zu\\[rs]n\", j);\n" "\\&\n" " exit(EXIT_SUCCESS);\n" "}\n" msgstr "" "#define _GNU_SOURCE\n" "#include Eerr.hE\n" "#include Eerrno.hE\n" "#include Epthread.hE\n" "#include Estdio.hE\n" "#include Estdlib.hE\n" "\\&\n" "int\n" "main(void)\n" "{\n" " int s;\n" " cpu_set_t cpuset;\n" " pthread_t thread;\n" "\\&\n" " thread = pthread_self();\n" "\\&\n" " /* Set affinity mask to include CPUs 0 to 7. */\n" "\\&\n" " CPU_ZERO(&cpuset);\n" " for (size_t j = 0; j E 8; j++)\n" " CPU_SET(j, &cpuset);\n" "\\&\n" " s = pthread_setaffinity_np(thread, sizeof(cpuset), &cpuset);\n" " if (s != 0)\n" " errc(EXIT_FAILURE, s, \"pthread_setaffinity_np\");\n" "\\&\n" " /* Check the actual affinity mask assigned to the thread. */\n" "\\&\n" " s = pthread_getaffinity_np(thread, sizeof(cpuset), &cpuset);\n" " if (s != 0)\n" " errc(EXIT_FAILURE, s, \"pthread_getaffinity_np\");\n" "\\&\n" " printf(\"Set returned by pthread_getaffinity_np() contained:\\[rs]n\");\n" " for (size_t j = 0; j E CPU_SETSIZE; j++)\n" " if (CPU_ISSET(j, &cpuset))\n" " printf(\" CPU %zu\\[rs]n\", j);\n" "\\&\n" " exit(EXIT_SUCCESS);\n" "}\n" #. type: TH #: fedora-44 fedora-rawhide #, no-wrap msgid "2024-11-03" msgstr "3 نوفمبر 2024" #. type: TH #: fedora-44 fedora-rawhide #, no-wrap msgid "Linux man-pages 6.13" msgstr "صفحات دليل لينكس 6.13" #. type: Plain text #: fedora-44 fedora-rawhide #, no-wrap msgid "" "#define _GNU_SOURCE\n" "#include Eerr.hE\n" "#include Epthread.hE\n" "#include Esched.hE\n" "#include Estdio.hE\n" "#include Estdlib.hE\n" "\\&\n" "int\n" "main(void)\n" "{\n" " int s;\n" " cpu_set_t cpuset;\n" " pthread_t thread;\n" "\\&\n" " thread = pthread_self();\n" "\\&\n" " /* Set affinity mask to include CPUs 0 to 7. */\n" "\\&\n" " CPU_ZERO(&cpuset);\n" " for (size_t j = 0; j E 8; j++)\n" " CPU_SET(j, &cpuset);\n" "\\&\n" " s = pthread_setaffinity_np(thread, sizeof(cpuset), &cpuset);\n" " if (s != 0)\n" " errc(EXIT_FAILURE, s, \"pthread_setaffinity_np\");\n" "\\&\n" " /* Check the actual affinity mask assigned to the thread. */\n" "\\&\n" " s = pthread_getaffinity_np(thread, sizeof(cpuset), &cpuset);\n" " if (s != 0)\n" " errc(EXIT_FAILURE, s, \"pthread_getaffinity_np\");\n" "\\&\n" " printf(\"Set returned by pthread_getaffinity_np() contained:\\[rs]n\");\n" " for (size_t j = 0; j E CPU_SETSIZE; j++)\n" " if (CPU_ISSET(j, &cpuset))\n" " printf(\" CPU %zu\\[rs]n\", j);\n" "\\&\n" " exit(EXIT_SUCCESS);\n" "}\n" msgstr "" "#define _GNU_SOURCE\n" "#include Eerr.hE\n" "#include Epthread.hE\n" "#include Esched.hE\n" "#include Estdio.hE\n" "#include Estdlib.hE\n" "\\&\n" "int\n" "main(void)\n" "{\n" " int s;\n" " cpu_set_t cpuset;\n" " pthread_t thread;\n" "\\&\n" " thread = pthread_self();\n" "\\&\n" " /* Set affinity mask to include CPUs 0 to 7. */\n" "\\&\n" " CPU_ZERO(&cpuset);\n" " for (size_t j = 0; j E 8; j++)\n" " CPU_SET(j, &cpuset);\n" "\\&\n" " s = pthread_setaffinity_np(thread, sizeof(cpuset), &cpuset);\n" " if (s != 0)\n" " errc(EXIT_FAILURE, s, \"pthread_setaffinity_np\");\n" "\\&\n" " /* Check the actual affinity mask assigned to the thread. */\n" "\\&\n" " s = pthread_getaffinity_np(thread, sizeof(cpuset), &cpuset);\n" " if (s != 0)\n" " errc(EXIT_FAILURE, s, \"pthread_getaffinity_np\");\n" "\\&\n" " printf(\"Set returned by pthread_getaffinity_np() contained:\\[rs]n\");\n" " for (size_t j = 0; j E CPU_SETSIZE; j++)\n" " if (CPU_ISSET(j, &cpuset))\n" " printf(\" CPU %zu\\[rs]n\", j);\n" "\\&\n" " exit(EXIT_SUCCESS);\n" "}\n" #. 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 "صفحات دليل لينكس (لم تصدر بعد)"