# 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-02 19:39+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_mutexattr_setrobust" msgstr "pthread_mutexattr_setrobust" #. 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 "" "pthread_mutexattr_getrobust, pthread_mutexattr_setrobust - get and set the " "robustness attribute of a mutex attributes object" msgstr "" "pthread_mutexattr_getrobust, pthread_mutexattr_setrobust - الحصول على وضبط " "سمة المتانة لكائن سمات القفل المتبادل" #. 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<#include Epthread.hE>\n" msgstr "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<,>\n" "B< int *>IB<);>\n" "BIB<,>\n" "B< int >IB<);>\n" msgstr "" "BIB<,>\n" "B< int *>IB<);>\n" "BIB<,>\n" "B< int >IB<);>\n" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "Feature Test Macro Requirements for glibc (see B(7)):" msgstr "" "متطلبات ماكروات اختبار الميزات لـ glibc (انظر B(7)):" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "B(), B():" msgstr "B()، B():" #. FIXME . #. But see https://sourceware.org/bugzilla/show_bug.cgi?id=22125 #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid " _POSIX_C_SOURCE E= 200809L\n" msgstr " _POSIX_C_SOURCE E= 200809L\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 places the value of the " "robustness attribute of the mutex attributes object referred to by I " "in I<*robustness>. The B() function sets the " "value of the robustness attribute of the mutex attributes object referred to " "by I to the value specified in I<*robustness>." msgstr "" "تضع الدالة B() قيمة سمة المتانة لكائن سمات " "القفل المتبادل المشار إليه بـ I في I<*robustness>. وتضبط الدالة " "B() قيمة سمة المتانة لكائن سمات القفل المتبادل " "المشار إليه بـ I إلى القيمة المحددة في I<*robustness>." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "The robustness attribute specifies the behavior of the mutex when the owning " "thread dies without unlocking the mutex. The following values are valid for " "I:" msgstr "" "تحدد سمة المتانة سلوك القفل المتبادل عندما يموت الخيط المالك دون فتح القفل " "المتبادل. القيم التالية صالحة لـ 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 "" "This is the default value for a mutex attributes object. If a mutex is " "initialized with the B attribute and its owner dies " "without unlocking it, the mutex remains locked afterwards and any future " "attempts to call B(3) on the mutex will block " "indefinitely." msgstr "" "هذه هي القيمة المبدئية لكائن سمات القفل المتبادل. إذا وُصِل قفل متبادل بسمة " "B ومات مالكه دون فتحه، يظل القفل المتبادل مقفلاً بعد " "ذلك وستحجب أي محاولات مستقبلية لاستدعاء B(3) على القفل " "المتبادل إلى أجل غير مسمى." #. 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 "" "If a mutex is initialized with the B attribute and its " "owner dies without unlocking it, any future attempts to call " "B(3) on this mutex will succeed and return " "B to indicate that the original owner no longer exists and the " "mutex is in an inconsistent state. Usually after B is returned, " "the next owner should call B(3) on the acquired " "mutex to make it consistent again before using it any further." msgstr "" "إذا وُصِل قفل متبادل بسمة B ومات مالكه دون فتحه، ستنجح " "أي محاولات مستقبلية لاستدعاء B(3) على هذا القفل المتبادل " "وستعيد B للإشارة إلى أن المالك الأصلي لم يعد موجودًا وأن القفل " "المتبادل في حالة غير متناسقة. عادةً بعد إعادة B، يجب على المالك " "التالي استدعاء B(3) على القفل المتبادل المكتسب " "لجعله متناسقًا مرة أخرى قبل استخدامه أكثر." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "If the next owner unlocks the mutex using B(3) before " "making it consistent, the mutex will be permanently unusable and any " "subsequent attempts to lock it using B(3) will fail " "with the error B. The only permitted operation on such a " "mutex is B(3)." msgstr "" "إذا فتح المالك التالي القفل المتبادل باستخدام B(3) قبل " "جعله متناسقًا، سيصبح القفل المتبادل غير قابل للاستخدام بشكل دائم وستفشل أي " "محاولات لاحقة لقفله باستخدام B(3) مع الخطأ " "B. العملية الوحيدة المسموح بها على مثل هذا القفل المتبادل " "هي B(3)." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "If the next owner terminates before calling B(3), " "further B(3) operations on this mutex will still return " "B." msgstr "" "إذا أنهى المالك التالي قبل استدعاء B(3)، ستظل " "عمليات B(3) الإضافية على هذا القفل المتبادل تعيد " "B." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "Note that the I argument of B() and " "B() should refer to a mutex attributes object " "that was initialized by B(3), otherwise the behavior " "is undefined." msgstr "" "لاحظ أن معامل I لـ B() و " "B() يجب أن يشير إلى كائن سمات قفل متبادل تمت " "تهيئته بواسطة 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 positive " "error number." msgstr "تُعيد هذه الدوال 0 عند النجاح. وتُعيد رقم خطأ موجب عند حدوث خطأ." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "In the glibc implementation, B() always return " "zero." msgstr "في تطبيق glibc، تعيد B() دائمًا صفرًا." #. 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 value other than B or B was " "passed to B()." msgstr "" "وُصِلت قيمة غير B أو B إلى " "B()." #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "VERSIONS" msgstr "الإصدارات" #. E.g., Solaris, according to its manual page #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "In the Linux implementation, when using process-shared robust mutexes, a " "waiting thread also receives the B notification if the owner of " "a robust mutex performs an B(2) without first unlocking the mutex. " "POSIX.1 does not specify this detail, but the same behavior also occurs in " "at least some other implementations." msgstr "" "في تطبيق Linux، عند استخدام أقفال متبادلة متينة مشتركة بين العمليات، يتلقى " "الخيط المنتظر أيضًا إشعار B إذا قام مالك قفل متبادل متين بتنفيذ " "B(2) دون فتح القفل المتبادل أولاً. لا يحدد POSIX.1 هذه التفاصيل، ولكن " "يحدث نفس السلوك أيضًا في بعض التطبيقات الأخرى على الأقل." #. 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 "POSIX.1-2008." msgstr "POSIX.1-2008." #. 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.12. POSIX.1-2008." msgstr "glibc 2.12. POSIX.1-2008." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "Before the addition of B() and " "B() to POSIX, glibc defined the following " "equivalent nonstandard functions if B<_GNU_SOURCE> was defined:" msgstr "" "قبل إضافة B() و " "B() إلى POSIX، عرّفت glibc الدوال غير القياسية " "المكافئة التالية إذا عُرفت B<_GNU_SOURCE>:" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "" "B<[[deprecated]]>\n" "BIB<,>\n" "B< int *>IB<);>\n" "B<[[deprecated]]>\n" "BIB<,>\n" "B< int >IB<);>\n" msgstr "" "B<[[deprecated]]>\n" "BIB<,>\n" "B< int *>IB<);>\n" "B<[[deprecated]]>\n" "BIB<,>\n" "B< int >IB<);>\n" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "Correspondingly, the constants B and " "B were also defined." msgstr "" "بالمقابل، عُرفت أيضًا الثوابت B و " "B." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "These GNU-specific APIs, which first appeared in glibc 2.4, are nowadays " "obsolete and should not be used in new programs; since glibc 2.34 these APIs " "are marked as deprecated." msgstr "" "واجهات برمجة التطبيقات الخاصة بـ GNU هذه، التي ظهرت لأول مرة في glibc 2.4، " "أصبحت الآن مهملة ولا ينبغي استخدامها في البرامج الجديدة؛ منذ glibc 2.34، " "وُسِمت واجهات برمجة التطبيقات هذه بأنها مهملة." #. 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 program below demonstrates the use of the robustness attribute of a " "mutex attributes object. In this program, a thread holding the mutex dies " "prematurely without unlocking the mutex. The main thread subsequently " "acquires the mutex successfully and gets the error B, after " "which it makes the mutex consistent." msgstr "" "البرنامج أدناه يوضح استخدام سمة المتانة لكائن سمات المزامنة. في هذا " "البرنامج، يموت خيط يحمل المزامنة مبكراً دون فتح المزامنة. يحصل الخيط الرئيسي " "لاحقاً على المزامنة بنجاح ويحصل على الخطأ B، وبعد ذلك يجعل " "المزامنة متسقة." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "The following shell session shows what we see when running this program:" msgstr "جلسة الصدفة التالية تظهر ما نراه عند تشغيل هذا البرنامج:" #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed #, no-wrap msgid "" "$B< ./a.out>;\n" "[original owner] Setting lock...\n" "[original owner] Locked. Now exiting without unlocking.\n" "[main] Attempting to lock the robust mutex.\n" "[main] pthread_mutex_lock() returned EOWNERDEAD\n" "[main] Now make the mutex consistent\n" "[main] Mutex is now consistent; unlocking\n" msgstr "" "$B< ./a.out>;\n" "[original owner] Setting lock...\n" "[original owner] Locked. Now exiting without unlocking.\n" "[main] Attempting to lock the robust mutex.\n" "[main] pthread_mutex_lock() returned EOWNERDEAD\n" "[main] Now make the mutex consistent\n" "[main] Mutex is now consistent; unlocking\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 Eerrno.hE\n" "#include Epthread.hE\n" "#include Estdio.hE\n" "#include Estdlib.hE\n" "#include Eunistd.hE\n" "\\&\n" "static pthread_mutex_t mtx;\n" "\\&\n" "static void *\n" "original_owner_thread(void *ptr)\n" "{\n" " printf(\"[original owner] Setting lock...\\[rs]n\");\n" " pthread_mutex_lock(&mtx);\n" " printf(\"[original owner] Locked. Now exiting without unlocking.\\[rs]n\");\n" " pthread_exit(NULL);\n" "}\n" "\\&\n" "int\n" "main(void)\n" "{\n" " pthread_t thr;\n" " pthread_mutexattr_t attr;\n" " int s;\n" "\\&\n" " pthread_mutexattr_init(&attr);\n" "\\&\n" " pthread_mutexattr_setrobust(&attr, PTHREAD_MUTEX_ROBUST);\n" "\\&\n" " pthread_mutex_init(&mtx, &attr);\n" "\\&\n" " pthread_create(&thr, NULL, original_owner_thread, NULL);\n" "\\&\n" " sleep(2);\n" "\\&\n" " /* \"original_owner_thread\" should have exited by now. */\n" "\\&\n" " printf(\"[main] Attempting to lock the robust mutex.\\[rs]n\");\n" " s = pthread_mutex_lock(&mtx);\n" " if (s == EOWNERDEAD) {\n" " printf(\"[main] pthread_mutex_lock() returned EOWNERDEAD\\[rs]n\");\n" " printf(\"[main] Now make the mutex consistent\\[rs]n\");\n" " s = pthread_mutex_consistent(&mtx);\n" " if (s != 0)\n" " errc(EXIT_FAILURE, s, \"pthread_mutex_consistent\");\n" " printf(\"[main] Mutex is now consistent; unlocking\\[rs]n\");\n" " s = pthread_mutex_unlock(&mtx);\n" " if (s != 0)\n" " errc(EXIT_FAILURE, s, \"pthread_mutex_unlock\");\n" "\\&\n" " exit(EXIT_SUCCESS);\n" " } else if (s == 0) {\n" " printf(\"[main] pthread_mutex_lock() unexpectedly succeeded\\[rs]n\");\n" " exit(EXIT_FAILURE);\n" " } else {\n" " printf(\"[main] pthread_mutex_lock() unexpectedly failed\\[rs]n\");\n" " errc(EXIT_FAILURE, s, \"pthread_mutex_lock\");\n" " }\n" "}\n" msgstr "" "#include Eerr.hE\n" "#include Eerrno.hE\n" "#include Epthread.hE\n" "#include Estdio.hE\n" "#include Estdlib.hE\n" "#include Eunistd.hE\n" "\\&\n" "static pthread_mutex_t mtx;\n" "\\&\n" "static void *\n" "original_owner_thread(void *ptr)\n" "{\n" " printf(\"[original owner] Setting lock...\\[rs]n\");\n" " pthread_mutex_lock(&mtx);\n" " printf(\"[original owner] Locked. Now exiting without unlocking.\\[rs]n\");\n" " pthread_exit(NULL);\n" "}\n" "\\&\n" "int\n" "main(void)\n" "{\n" " pthread_t thr;\n" " pthread_mutexattr_t attr;\n" " int s;\n" "\\&\n" " pthread_mutexattr_init(&attr);\n" "\\&\n" " pthread_mutexattr_setrobust(&attr, PTHREAD_MUTEX_ROBUST);\n" "\\&\n" " pthread_mutex_init(&mtx, &attr);\n" "\\&\n" " pthread_create(&thr, NULL, original_owner_thread, NULL);\n" "\\&\n" " sleep(2);\n" "\\&\n" " /* \"original_owner_thread\" should have exited by now. */\n" "\\&\n" " printf(\"[main] Attempting to lock the robust mutex.\\[rs]n\");\n" " s = pthread_mutex_lock(&mtx);\n" " if (s == EOWNERDEAD) {\n" " printf(\"[main] pthread_mutex_lock() returned EOWNERDEAD\\[rs]n\");\n" " printf(\"[main] Now make the mutex consistent\\[rs]n\");\n" " s = pthread_mutex_consistent(&mtx);\n" " if (s != 0)\n" " errc(EXIT_FAILURE, s, \"pthread_mutex_consistent\");\n" " printf(\"[main] Mutex is now consistent; unlocking\\[rs]n\");\n" " s = pthread_mutex_unlock(&mtx);\n" " if (s != 0)\n" " errc(EXIT_FAILURE, s, \"pthread_mutex_unlock\");\n" "\\&\n" " exit(EXIT_SUCCESS);\n" " } else if (s == 0) {\n" " printf(\"[main] pthread_mutex_lock() unexpectedly succeeded\\[rs]n\");\n" " exit(EXIT_FAILURE);\n" " } else {\n" " printf(\"[main] pthread_mutex_lock() unexpectedly failed\\[rs]n\");\n" " errc(EXIT_FAILURE, s, \"pthread_mutex_lock\");\n" " }\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(3), B(3), " "B(3), B(7)" msgstr "" "B(2), B(2), " "B(3), B(3), " "B(3), 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 fedora-44 fedora-rawhide #, no-wrap msgid "" "$ B<./a.out>\n" "[original owner] Setting lock...\n" "[original owner] Locked. Now exiting without unlocking.\n" "[main] Attempting to lock the robust mutex.\n" "[main] pthread_mutex_lock() returned EOWNERDEAD\n" "[main] Now make the mutex consistent\n" "[main] Mutex is now consistent; unlocking\n" msgstr "" "$ B<./a.out>\n" "[original owner] Setting lock...\n" "[original owner] Locked. Now exiting without unlocking.\n" "[main] Attempting to lock the robust mutex.\n" "[main] pthread_mutex_lock() returned EOWNERDEAD\n" "[main] Now make the mutex consistent\n" "[main] Mutex is now consistent; unlocking\n" #. type: Plain text #: debian-trixie fedora-44 fedora-rawhide #, no-wrap msgid "" "#include Eerrno.hE\n" "#include Epthread.hE\n" "#include Estdio.hE\n" "#include Estdlib.hE\n" "#include Eunistd.hE\n" "\\&\n" "#define handle_error_en(en, msg) \\[rs]\n" " do { errno = en; perror(msg); exit(EXIT_FAILURE); } while (0)\n" "\\&\n" "static pthread_mutex_t mtx;\n" "\\&\n" "static void *\n" "original_owner_thread(void *ptr)\n" "{\n" " printf(\"[original owner] Setting lock...\\[rs]n\");\n" " pthread_mutex_lock(&mtx);\n" " printf(\"[original owner] Locked. Now exiting without unlocking.\\[rs]n\");\n" " pthread_exit(NULL);\n" "}\n" "\\&\n" "int\n" "main(void)\n" "{\n" " pthread_t thr;\n" " pthread_mutexattr_t attr;\n" " int s;\n" "\\&\n" " pthread_mutexattr_init(&attr);\n" "\\&\n" " pthread_mutexattr_setrobust(&attr, PTHREAD_MUTEX_ROBUST);\n" "\\&\n" " pthread_mutex_init(&mtx, &attr);\n" "\\&\n" " pthread_create(&thr, NULL, original_owner_thread, NULL);\n" "\\&\n" " sleep(2);\n" "\\&\n" " /* \"original_owner_thread\" should have exited by now. */\n" "\\&\n" " printf(\"[main] Attempting to lock the robust mutex.\\[rs]n\");\n" " s = pthread_mutex_lock(&mtx);\n" " if (s == EOWNERDEAD) {\n" " printf(\"[main] pthread_mutex_lock() returned EOWNERDEAD\\[rs]n\");\n" " printf(\"[main] Now make the mutex consistent\\[rs]n\");\n" " s = pthread_mutex_consistent(&mtx);\n" " if (s != 0)\n" " handle_error_en(s, \"pthread_mutex_consistent\");\n" " printf(\"[main] Mutex is now consistent; unlocking\\[rs]n\");\n" " s = pthread_mutex_unlock(&mtx);\n" " if (s != 0)\n" " handle_error_en(s, \"pthread_mutex_unlock\");\n" "\\&\n" " exit(EXIT_SUCCESS);\n" " } else if (s == 0) {\n" " printf(\"[main] pthread_mutex_lock() unexpectedly succeeded\\[rs]n\");\n" " exit(EXIT_FAILURE);\n" " } else {\n" " printf(\"[main] pthread_mutex_lock() unexpectedly failed\\[rs]n\");\n" " handle_error_en(s, \"pthread_mutex_lock\");\n" " }\n" "}\n" msgstr "" "#include Eerrno.hE\n" "#include Epthread.hE\n" "#include Estdio.hE\n" "#include Estdlib.hE\n" "#include Eunistd.hE\n" "\\&\n" "#define handle_error_en(en, msg) \\[rs]\n" " do { errno = en; perror(msg); exit(EXIT_FAILURE); } while (0)\n" "\\&\n" "static pthread_mutex_t mtx;\n" "\\&\n" "static void *\n" "original_owner_thread(void *ptr)\n" "{\n" " printf(\"[original owner] Setting lock...\\[rs]n\");\n" " pthread_mutex_lock(&mtx);\n" " printf(\"[original owner] Locked. Now exiting without unlocking.\\[rs]n\");\n" " pthread_exit(NULL);\n" "}\n" "\\&\n" "int\n" "main(void)\n" "{\n" " pthread_t thr;\n" " pthread_mutexattr_t attr;\n" " int s;\n" "\\&\n" " pthread_mutexattr_init(&attr);\n" "\\&\n" " pthread_mutexattr_setrobust(&attr, PTHREAD_MUTEX_ROBUST);\n" "\\&\n" " pthread_mutex_init(&mtx, &attr);\n" "\\&\n" " pthread_create(&thr, NULL, original_owner_thread, NULL);\n" "\\&\n" " sleep(2);\n" "\\&\n" " /* \"original_owner_thread\" should have exited by now. */\n" "\\&\n" " printf(\"[main] Attempting to lock the robust mutex.\\[rs]n\");\n" " s = pthread_mutex_lock(&mtx);\n" " if (s == EOWNERDEAD) {\n" " printf(\"[main] pthread_mutex_lock() returned EOWNERDEAD\\[rs]n\");\n" " printf(\"[main] Now make the mutex consistent\\[rs]n\");\n" " s = pthread_mutex_consistent(&mtx);\n" " if (s != 0)\n" " handle_error_en(s, \"pthread_mutex_consistent\");\n" " printf(\"[main] Mutex is now consistent; unlocking\\[rs]n\");\n" " s = pthread_mutex_unlock(&mtx);\n" " if (s != 0)\n" " handle_error_en(s, \"pthread_mutex_unlock\");\n" "\\&\n" " exit(EXIT_SUCCESS);\n" " } else if (s == 0) {\n" " printf(\"[main] pthread_mutex_lock() unexpectedly succeeded\\[rs]n\");\n" " exit(EXIT_FAILURE);\n" " } else {\n" " printf(\"[main] pthread_mutex_lock() unexpectedly failed\\[rs]n\");\n" " handle_error_en(s, \"pthread_mutex_lock\");\n" " }\n" "}\n" #. type: TH #: fedora-44 fedora-rawhide #, no-wrap msgid "2024-07-23" msgstr "23 يوليو 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 "صفحات دليل لينكس (لم تصدر بعد)"