Debian Codegraph @

po/ar/man3/pthread_mutexattr_setrobust.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:38+0200\n"
9 "PO-Revision-Date: 2026-06-02 19:39+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 "pthread_mutexattr_setrobust"
25 msgstr "pthread_mutexattr_setrobust"
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 ""
51 "pthread_mutexattr_getrobust, pthread_mutexattr_setrobust - get and set the "
52 "robustness attribute of a mutex attributes object"
53 msgstr ""
54 "pthread_mutexattr_getrobust, pthread_mutexattr_setrobust - الحصول على وضبط "
55 "سمة المتانة لكائن سمات القفل المتبادل"
56
57 #. type: SH
58 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
59 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
60 #, no-wrap
61 msgid "LIBRARY"
62 msgstr "المكتبة"
63
64 #. type: Plain text
65 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
66 #: opensuse-leap-16-1 opensuse-tumbleweed
67 msgid "POSIX threads library (I<libpthread>,\\ I<-lpthread>)"
68 msgstr "مكتبة مسالك POSIX (I<libpthread>،\\ I<-lpthread>)"
69
70 #. type: SH
71 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
72 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
73 #, no-wrap
74 msgid "SYNOPSIS"
75 msgstr "موجز"
76
77 #. type: Plain text
78 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
79 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
80 #, no-wrap
81 msgid "B<#include E<lt>pthread.hE<gt>>\n"
82 msgstr "B<#include E<lt>pthread.hE<gt>>\n"
83
84 #. type: Plain text
85 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
86 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
87 #, no-wrap
88 msgid ""
89 "B<int pthread_mutexattr_getrobust(const pthread_mutexattr_t *>I<attr>B<,>\n"
90 "B< int *>I<robustness>B<);>\n"
91 "B<int pthread_mutexattr_setrobust(pthread_mutexattr_t *>I<attr>B<,>\n"
92 "B< int >I<robustness>B<);>\n"
93 msgstr ""
94 "B<int pthread_mutexattr_getrobust(const pthread_mutexattr_t *>I<attr>B<,>\n"
95 "B< int *>I<robustness>B<);>\n"
96 "B<int pthread_mutexattr_setrobust(pthread_mutexattr_t *>I<attr>B<,>\n"
97 "B< int >I<robustness>B<);>\n"
98
99 #. type: Plain text
100 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
101 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
102 msgid ""
103 "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
104 msgstr ""
105 "متطلبات ماكروات اختبار الميزات لـ glibc (انظر B<feature_test_macros>(7)):"
106
107 #. type: Plain text
108 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
109 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
110 msgid "B<pthread_mutexattr_getrobust>(), B<pthread_mutexattr_setrobust>():"
111 msgstr "B<pthread_mutexattr_getrobust>()، B<pthread_mutexattr_setrobust>():"
112
113 #. FIXME .
114 #. But see https://sourceware.org/bugzilla/show_bug.cgi?id=22125
115 #. type: Plain text
116 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
117 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
118 #, no-wrap
119 msgid " _POSIX_C_SOURCE E<gt>= 200809L\n"
120 msgstr " _POSIX_C_SOURCE E<gt>= 200809L\n"
121
122 #. type: SH
123 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
124 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
125 #, no-wrap
126 msgid "DESCRIPTION"
127 msgstr "الوصف"
128
129 #. type: Plain text
130 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
131 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
132 msgid ""
133 "The B<pthread_mutexattr_getrobust>() function places the value of the "
134 "robustness attribute of the mutex attributes object referred to by I<attr> "
135 "in I<*robustness>. The B<pthread_mutexattr_setrobust>() function sets the "
136 "value of the robustness attribute of the mutex attributes object referred to "
137 "by I<attr> to the value specified in I<*robustness>."
138 msgstr ""
139 "تضع الدالة B<pthread_mutexattr_getrobust>() قيمة سمة المتانة لكائن سمات "
140 "القفل المتبادل المشار إليه بـ I<attr> في I<*robustness>. وتضبط الدالة "
141 "B<pthread_mutexattr_setrobust>() قيمة سمة المتانة لكائن سمات القفل المتبادل "
142 "المشار إليه بـ I<attr> إلى القيمة المحددة في I<*robustness>."
143
144 #. type: Plain text
145 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
146 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
147 msgid ""
148 "The robustness attribute specifies the behavior of the mutex when the owning "
149 "thread dies without unlocking the mutex. The following values are valid for "
150 "I<robustness>:"
151 msgstr ""
152 "تحدد سمة المتانة سلوك القفل المتبادل عندما يموت الخيط المالك دون فتح القفل "
153 "المتبادل. القيم التالية صالحة لـ I<robustness>:"
154
155 #. type: TP
156 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
157 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
158 #, no-wrap
159 msgid "B<PTHREAD_MUTEX_STALLED>"
160 msgstr "B<PTHREAD_MUTEX_STALLED>"
161
162 #. type: Plain text
163 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
164 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
165 msgid ""
166 "This is the default value for a mutex attributes object. If a mutex is "
167 "initialized with the B<PTHREAD_MUTEX_STALLED> attribute and its owner dies "
168 "without unlocking it, the mutex remains locked afterwards and any future "
169 "attempts to call B<pthread_mutex_lock>(3) on the mutex will block "
170 "indefinitely."
171 msgstr ""
172 "هذه هي القيمة المبدئية لكائن سمات القفل المتبادل. إذا وُصِل قفل متبادل بسمة "
173 "B<PTHREAD_MUTEX_STALLED> ومات مالكه دون فتحه، يظل القفل المتبادل مقفلاً بعد "
174 "ذلك وستحجب أي محاولات مستقبلية لاستدعاء B<pthread_mutex_lock>(3) على القفل "
175 "المتبادل إلى أجل غير مسمى."
176
177 #. type: TP
178 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
179 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
180 #, no-wrap
181 msgid "B<PTHREAD_MUTEX_ROBUST>"
182 msgstr "B<PTHREAD_MUTEX_ROBUST>"
183
184 #. type: Plain text
185 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
186 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
187 msgid ""
188 "If a mutex is initialized with the B<PTHREAD_MUTEX_ROBUST> attribute and its "
189 "owner dies without unlocking it, any future attempts to call "
190 "B<pthread_mutex_lock>(3) on this mutex will succeed and return "
191 "B<EOWNERDEAD> to indicate that the original owner no longer exists and the "
192 "mutex is in an inconsistent state. Usually after B<EOWNERDEAD> is returned, "
193 "the next owner should call B<pthread_mutex_consistent>(3) on the acquired "
194 "mutex to make it consistent again before using it any further."
195 msgstr ""
196 "إذا وُصِل قفل متبادل بسمة B<PTHREAD_MUTEX_ROBUST> ومات مالكه دون فتحه، ستنجح "
197 "أي محاولات مستقبلية لاستدعاء B<pthread_mutex_lock>(3) على هذا القفل المتبادل "
198 "وستعيد B<EOWNERDEAD> للإشارة إلى أن المالك الأصلي لم يعد موجودًا وأن القفل "
199 "المتبادل في حالة غير متناسقة. عادةً بعد إعادة B<EOWNERDEAD>، يجب على المالك "
200 "التالي استدعاء B<pthread_mutex_consistent>(3) على القفل المتبادل المكتسب "
201 "لجعله متناسقًا مرة أخرى قبل استخدامه أكثر."
202
203 #. type: Plain text
204 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
205 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
206 msgid ""
207 "If the next owner unlocks the mutex using B<pthread_mutex_unlock>(3) before "
208 "making it consistent, the mutex will be permanently unusable and any "
209 "subsequent attempts to lock it using B<pthread_mutex_lock>(3) will fail "
210 "with the error B<ENOTRECOVERABLE>. The only permitted operation on such a "
211 "mutex is B<pthread_mutex_destroy>(3)."
212 msgstr ""
213 "إذا فتح المالك التالي القفل المتبادل باستخدام B<pthread_mutex_unlock>(3) قبل "
214 "جعله متناسقًا، سيصبح القفل المتبادل غير قابل للاستخدام بشكل دائم وستفشل أي "
215 "محاولات لاحقة لقفله باستخدام B<pthread_mutex_lock>(3) مع الخطأ "
216 "B<ENOTRECOVERABLE>. العملية الوحيدة المسموح بها على مثل هذا القفل المتبادل "
217 "هي B<pthread_mutex_destroy>(3)."
218
219 #. type: Plain text
220 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
221 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
222 msgid ""
223 "If the next owner terminates before calling B<pthread_mutex_consistent>(3), "
224 "further B<pthread_mutex_lock>(3) operations on this mutex will still return "
225 "B<EOWNERDEAD>."
226 msgstr ""
227 "إذا أنهى المالك التالي قبل استدعاء B<pthread_mutex_consistent>(3)، ستظل "
228 "عمليات B<pthread_mutex_lock>(3) الإضافية على هذا القفل المتبادل تعيد "
229 "B<EOWNERDEAD>."
230
231 #. type: Plain text
232 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
233 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
234 msgid ""
235 "Note that the I<attr> argument of B<pthread_mutexattr_getrobust>() and "
236 "B<pthread_mutexattr_setrobust>() should refer to a mutex attributes object "
237 "that was initialized by B<pthread_mutexattr_init>(3), otherwise the behavior "
238 "is undefined."
239 msgstr ""
240 "لاحظ أن معامل I<attr> لـ B<pthread_mutexattr_getrobust>() و "
241 "B<pthread_mutexattr_setrobust>() يجب أن يشير إلى كائن سمات قفل متبادل تمت "
242 "تهيئته بواسطة B<pthread_mutexattr_init>(3)، وإلا كان السلوك غير محدد."
243
244 #. type: SH
245 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
246 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
247 #, no-wrap
248 msgid "RETURN VALUE"
249 msgstr "قيمة الإرجاع"
250
251 #. type: Plain text
252 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
253 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
254 msgid ""
255 "On success, these functions return 0. On error, they return a positive "
256 "error number."
257 msgstr "تُعيد هذه الدوال 0 عند النجاح. وتُعيد رقم خطأ موجب عند حدوث خطأ."
258
259 #. type: Plain text
260 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
261 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
262 msgid ""
263 "In the glibc implementation, B<pthread_mutexattr_getrobust>() always return "
264 "zero."
265 msgstr "في تطبيق glibc، تعيد B<pthread_mutexattr_getrobust>() دائمًا صفرًا."
266
267 #. type: SH
268 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
269 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
270 #, no-wrap
271 msgid "ERRORS"
272 msgstr "الأخطاء"
273
274 #. type: TP
275 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
276 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
277 #, no-wrap
278 msgid "B<EINVAL>"
279 msgstr "B<EINVAL>"
280
281 #. type: Plain text
282 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
283 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
284 msgid ""
285 "A value other than B<PTHREAD_MUTEX_STALLED> or B<PTHREAD_MUTEX_ROBUST> was "
286 "passed to B<pthread_mutexattr_setrobust>()."
287 msgstr ""
288 "وُصِلت قيمة غير B<PTHREAD_MUTEX_STALLED> أو B<PTHREAD_MUTEX_ROBUST> إلى "
289 "B<pthread_mutexattr_setrobust>()."
290
291 #. type: SH
292 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
293 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
294 #, no-wrap
295 msgid "VERSIONS"
296 msgstr "الإصدارات"
297
298 #. E.g., Solaris, according to its manual page
299 #. type: Plain text
300 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
301 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
302 msgid ""
303 "In the Linux implementation, when using process-shared robust mutexes, a "
304 "waiting thread also receives the B<EOWNERDEAD> notification if the owner of "
305 "a robust mutex performs an B<execve>(2) without first unlocking the mutex. "
306 "POSIX.1 does not specify this detail, but the same behavior also occurs in "
307 "at least some other implementations."
308 msgstr ""
309 "في تطبيق Linux، عند استخدام أقفال متبادلة متينة مشتركة بين العمليات، يتلقى "
310 "الخيط المنتظر أيضًا إشعار B<EOWNERDEAD> إذا قام مالك قفل متبادل متين بتنفيذ "
311 "B<execve>(2) دون فتح القفل المتبادل أولاً. لا يحدد POSIX.1 هذه التفاصيل، ولكن "
312 "يحدث نفس السلوك أيضًا في بعض التطبيقات الأخرى على الأقل."
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 "STANDARDS"
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 "POSIX.1-2008."
325 msgstr "POSIX.1-2008."
326
327 #. type: SH
328 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
329 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
330 #, no-wrap
331 msgid "HISTORY"
332 msgstr "التاريخ"
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 "glibc 2.12. POSIX.1-2008."
338 msgstr "glibc 2.12. POSIX.1-2008."
339
340 #. type: Plain text
341 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
342 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
343 msgid ""
344 "Before the addition of B<pthread_mutexattr_getrobust>() and "
345 "B<pthread_mutexattr_setrobust>() to POSIX, glibc defined the following "
346 "equivalent nonstandard functions if B<_GNU_SOURCE> was defined:"
347 msgstr ""
348 "قبل إضافة B<pthread_mutexattr_getrobust>() و "
349 "B<pthread_mutexattr_setrobust>() إلى POSIX، عرّفت glibc الدوال غير القياسية "
350 "المكافئة التالية إذا عُرفت B<_GNU_SOURCE>:"
351
352 #. type: Plain text
353 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
354 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
355 #, no-wrap
356 msgid ""
357 "B<[[deprecated]]>\n"
358 "B<int pthread_mutexattr_getrobust_np(const pthread_mutexattr_t *>I<attr>B<,>\n"
359 "B< int *>I<robustness>B<);>\n"
360 "B<[[deprecated]]>\n"
361 "B<int pthread_mutexattr_setrobust_np(const pthread_mutexattr_t *>I<attr>B<,>\n"
362 "B< int >I<robustness>B<);>\n"
363 msgstr ""
364 "B<[[deprecated]]>\n"
365 "B<int pthread_mutexattr_getrobust_np(const pthread_mutexattr_t *>I<attr>B<,>\n"
366 "B< int *>I<robustness>B<);>\n"
367 "B<[[deprecated]]>\n"
368 "B<int pthread_mutexattr_setrobust_np(const pthread_mutexattr_t *>I<attr>B<,>\n"
369 "B< int >I<robustness>B<);>\n"
370
371 #. type: Plain text
372 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
373 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
374 msgid ""
375 "Correspondingly, the constants B<PTHREAD_MUTEX_STALLED_NP> and "
376 "B<PTHREAD_MUTEX_ROBUST_NP> were also defined."
377 msgstr ""
378 "بالمقابل، عُرفت أيضًا الثوابت B<PTHREAD_MUTEX_STALLED_NP> و "
379 "B<PTHREAD_MUTEX_ROBUST_NP>."
380
381 #. type: Plain text
382 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
383 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
384 msgid ""
385 "These GNU-specific APIs, which first appeared in glibc 2.4, are nowadays "
386 "obsolete and should not be used in new programs; since glibc 2.34 these APIs "
387 "are marked as deprecated."
388 msgstr ""
389 "واجهات برمجة التطبيقات الخاصة بـ GNU هذه، التي ظهرت لأول مرة في glibc 2.4، "
390 "أصبحت الآن مهملة ولا ينبغي استخدامها في البرامج الجديدة؛ منذ glibc 2.34، "
391 "وُسِمت واجهات برمجة التطبيقات هذه بأنها مهملة."
392
393 #. type: SH
394 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
395 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
396 #, no-wrap
397 msgid "EXAMPLES"
398 msgstr "أمثلة"
399
400 #. type: Plain text
401 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
402 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
403 msgid ""
404 "The program below demonstrates the use of the robustness attribute of a "
405 "mutex attributes object. In this program, a thread holding the mutex dies "
406 "prematurely without unlocking the mutex. The main thread subsequently "
407 "acquires the mutex successfully and gets the error B<EOWNERDEAD>, after "
408 "which it makes the mutex consistent."
409 msgstr ""
410 "البرنامج أدناه يوضح استخدام سمة المتانة لكائن سمات المزامنة. في هذا "
411 "البرنامج، يموت خيط يحمل المزامنة مبكراً دون فتح المزامنة. يحصل الخيط الرئيسي "
412 "لاحقاً على المزامنة بنجاح ويحصل على الخطأ B<EOWNERDEAD>، وبعد ذلك يجعل "
413 "المزامنة متسقة."
414
415 #. type: Plain text
416 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
417 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
418 msgid ""
419 "The following shell session shows what we see when running this program:"
420 msgstr "جلسة الصدفة التالية تظهر ما نراه عند تشغيل هذا البرنامج:"
421
422 #. type: Plain text
423 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
424 #: opensuse-tumbleweed
425 #, no-wrap
426 msgid ""
427 "$B< ./a.out>;\n"
428 "[original owner] Setting lock...\n"
429 "[original owner] Locked. Now exiting without unlocking.\n"
430 "[main] Attempting to lock the robust mutex.\n"
431 "[main] pthread_mutex_lock() returned EOWNERDEAD\n"
432 "[main] Now make the mutex consistent\n"
433 "[main] Mutex is now consistent; unlocking\n"
434 msgstr ""
435 "$B< ./a.out>;\n"
436 "[original owner] Setting lock...\n"
437 "[original owner] Locked. Now exiting without unlocking.\n"
438 "[main] Attempting to lock the robust mutex.\n"
439 "[main] pthread_mutex_lock() returned EOWNERDEAD\n"
440 "[main] Now make the mutex consistent\n"
441 "[main] Mutex is now consistent; unlocking\n"
442
443 #. type: SS
444 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
445 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
446 #, no-wrap
447 msgid "Program source"
448 msgstr "مصدر البرنامج"
449
450 #. type: Plain text
451 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
452 #: opensuse-tumbleweed
453 #, no-wrap
454 msgid ""
455 "#include E<lt>err.hE<gt>\n"
456 "#include E<lt>errno.hE<gt>\n"
457 "#include E<lt>pthread.hE<gt>\n"
458 "#include E<lt>stdio.hE<gt>\n"
459 "#include E<lt>stdlib.hE<gt>\n"
460 "#include E<lt>unistd.hE<gt>\n"
461 "\\&\n"
462 "static pthread_mutex_t mtx;\n"
463 "\\&\n"
464 "static void *\n"
465 "original_owner_thread(void *ptr)\n"
466 "{\n"
467 " printf(\"[original owner] Setting lock...\\[rs]n\");\n"
468 " pthread_mutex_lock(&mtx);\n"
469 " printf(\"[original owner] Locked. Now exiting without unlocking.\\[rs]n\");\n"
470 " pthread_exit(NULL);\n"
471 "}\n"
472 "\\&\n"
473 "int\n"
474 "main(void)\n"
475 "{\n"
476 " pthread_t thr;\n"
477 " pthread_mutexattr_t attr;\n"
478 " int s;\n"
479 "\\&\n"
480 " pthread_mutexattr_init(&attr);\n"
481 "\\&\n"
482 " pthread_mutexattr_setrobust(&attr, PTHREAD_MUTEX_ROBUST);\n"
483 "\\&\n"
484 " pthread_mutex_init(&mtx, &attr);\n"
485 "\\&\n"
486 " pthread_create(&thr, NULL, original_owner_thread, NULL);\n"
487 "\\&\n"
488 " sleep(2);\n"
489 "\\&\n"
490 " /* \"original_owner_thread\" should have exited by now. */\n"
491 "\\&\n"
492 " printf(\"[main] Attempting to lock the robust mutex.\\[rs]n\");\n"
493 " s = pthread_mutex_lock(&mtx);\n"
494 " if (s == EOWNERDEAD) {\n"
495 " printf(\"[main] pthread_mutex_lock() returned EOWNERDEAD\\[rs]n\");\n"
496 " printf(\"[main] Now make the mutex consistent\\[rs]n\");\n"
497 " s = pthread_mutex_consistent(&mtx);\n"
498 " if (s != 0)\n"
499 " errc(EXIT_FAILURE, s, \"pthread_mutex_consistent\");\n"
500 " printf(\"[main] Mutex is now consistent; unlocking\\[rs]n\");\n"
501 " s = pthread_mutex_unlock(&mtx);\n"
502 " if (s != 0)\n"
503 " errc(EXIT_FAILURE, s, \"pthread_mutex_unlock\");\n"
504 "\\&\n"
505 " exit(EXIT_SUCCESS);\n"
506 " } else if (s == 0) {\n"
507 " printf(\"[main] pthread_mutex_lock() unexpectedly succeeded\\[rs]n\");\n"
508 " exit(EXIT_FAILURE);\n"
509 " } else {\n"
510 " printf(\"[main] pthread_mutex_lock() unexpectedly failed\\[rs]n\");\n"
511 " errc(EXIT_FAILURE, s, \"pthread_mutex_lock\");\n"
512 " }\n"
513 "}\n"
514 msgstr ""
515 "#include E<lt>err.hE<gt>\n"
516 "#include E<lt>errno.hE<gt>\n"
517 "#include E<lt>pthread.hE<gt>\n"
518 "#include E<lt>stdio.hE<gt>\n"
519 "#include E<lt>stdlib.hE<gt>\n"
520 "#include E<lt>unistd.hE<gt>\n"
521 "\\&\n"
522 "static pthread_mutex_t mtx;\n"
523 "\\&\n"
524 "static void *\n"
525 "original_owner_thread(void *ptr)\n"
526 "{\n"
527 " printf(\"[original owner] Setting lock...\\[rs]n\");\n"
528 " pthread_mutex_lock(&mtx);\n"
529 " printf(\"[original owner] Locked. Now exiting without unlocking.\\[rs]n\");\n"
530 " pthread_exit(NULL);\n"
531 "}\n"
532 "\\&\n"
533 "int\n"
534 "main(void)\n"
535 "{\n"
536 " pthread_t thr;\n"
537 " pthread_mutexattr_t attr;\n"
538 " int s;\n"
539 "\\&\n"
540 " pthread_mutexattr_init(&attr);\n"
541 "\\&\n"
542 " pthread_mutexattr_setrobust(&attr, PTHREAD_MUTEX_ROBUST);\n"
543 "\\&\n"
544 " pthread_mutex_init(&mtx, &attr);\n"
545 "\\&\n"
546 " pthread_create(&thr, NULL, original_owner_thread, NULL);\n"
547 "\\&\n"
548 " sleep(2);\n"
549 "\\&\n"
550 " /* \"original_owner_thread\" should have exited by now. */\n"
551 "\\&\n"
552 " printf(\"[main] Attempting to lock the robust mutex.\\[rs]n\");\n"
553 " s = pthread_mutex_lock(&mtx);\n"
554 " if (s == EOWNERDEAD) {\n"
555 " printf(\"[main] pthread_mutex_lock() returned EOWNERDEAD\\[rs]n\");\n"
556 " printf(\"[main] Now make the mutex consistent\\[rs]n\");\n"
557 " s = pthread_mutex_consistent(&mtx);\n"
558 " if (s != 0)\n"
559 " errc(EXIT_FAILURE, s, \"pthread_mutex_consistent\");\n"
560 " printf(\"[main] Mutex is now consistent; unlocking\\[rs]n\");\n"
561 " s = pthread_mutex_unlock(&mtx);\n"
562 " if (s != 0)\n"
563 " errc(EXIT_FAILURE, s, \"pthread_mutex_unlock\");\n"
564 "\\&\n"
565 " exit(EXIT_SUCCESS);\n"
566 " } else if (s == 0) {\n"
567 " printf(\"[main] pthread_mutex_lock() unexpectedly succeeded\\[rs]n\");\n"
568 " exit(EXIT_FAILURE);\n"
569 " } else {\n"
570 " printf(\"[main] pthread_mutex_lock() unexpectedly failed\\[rs]n\");\n"
571 " errc(EXIT_FAILURE, s, \"pthread_mutex_lock\");\n"
572 " }\n"
573 "}\n"
574
575 #. SRC END
576 #. type: SH
577 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
578 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
579 #, no-wrap
580 msgid "SEE ALSO"
581 msgstr "انظر أيضًا"
582
583 #. type: Plain text
584 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
585 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
586 msgid ""
587 "B<get_robust_list>(2), B<set_robust_list>(2), "
588 "B<pthread_mutex_consistent>(3), B<pthread_mutex_init>(3), "
589 "B<pthread_mutex_lock>(3), B<pthreads>(7)"
590 msgstr ""
591 "B<get_robust_list>(2), B<set_robust_list>(2), "
592 "B<pthread_mutex_consistent>(3), B<pthread_mutex_init>(3), "
593 "B<pthread_mutex_lock>(3), B<pthreads>(7)"
594
595 #. type: TH
596 #: debian-trixie
597 #, no-wrap
598 msgid "2024-06-15"
599 msgstr "15 يونيو 2024"
600
601 #. type: TH
602 #: debian-trixie
603 #, no-wrap
604 msgid "Linux man-pages 6.9.1"
605 msgstr "صفحات دليل لينكس 6.9.1"
606
607 #. type: Plain text
608 #: debian-trixie
609 msgid "POSIX threads library (I<libpthread>, I<-lpthread>)"
610 msgstr "مكتبة مسالك POSIX (I<libpthread>، I<-lpthread>)"
611
612 #. type: Plain text
613 #: debian-trixie fedora-44 fedora-rawhide
614 #, no-wrap
615 msgid ""
616 "$ B<./a.out>\n"
617 "[original owner] Setting lock...\n"
618 "[original owner] Locked. Now exiting without unlocking.\n"
619 "[main] Attempting to lock the robust mutex.\n"
620 "[main] pthread_mutex_lock() returned EOWNERDEAD\n"
621 "[main] Now make the mutex consistent\n"
622 "[main] Mutex is now consistent; unlocking\n"
623 msgstr ""
624 "$ B<./a.out>\n"
625 "[original owner] Setting lock...\n"
626 "[original owner] Locked. Now exiting without unlocking.\n"
627 "[main] Attempting to lock the robust mutex.\n"
628 "[main] pthread_mutex_lock() returned EOWNERDEAD\n"
629 "[main] Now make the mutex consistent\n"
630 "[main] Mutex is now consistent; unlocking\n"
631
632 #. type: Plain text
633 #: debian-trixie fedora-44 fedora-rawhide
634 #, no-wrap
635 msgid ""
636 "#include E<lt>errno.hE<gt>\n"
637 "#include E<lt>pthread.hE<gt>\n"
638 "#include E<lt>stdio.hE<gt>\n"
639 "#include E<lt>stdlib.hE<gt>\n"
640 "#include E<lt>unistd.hE<gt>\n"
641 "\\&\n"
642 "#define handle_error_en(en, msg) \\[rs]\n"
643 " do { errno = en; perror(msg); exit(EXIT_FAILURE); } while (0)\n"
644 "\\&\n"
645 "static pthread_mutex_t mtx;\n"
646 "\\&\n"
647 "static void *\n"
648 "original_owner_thread(void *ptr)\n"
649 "{\n"
650 " printf(\"[original owner] Setting lock...\\[rs]n\");\n"
651 " pthread_mutex_lock(&mtx);\n"
652 " printf(\"[original owner] Locked. Now exiting without unlocking.\\[rs]n\");\n"
653 " pthread_exit(NULL);\n"
654 "}\n"
655 "\\&\n"
656 "int\n"
657 "main(void)\n"
658 "{\n"
659 " pthread_t thr;\n"
660 " pthread_mutexattr_t attr;\n"
661 " int s;\n"
662 "\\&\n"
663 " pthread_mutexattr_init(&attr);\n"
664 "\\&\n"
665 " pthread_mutexattr_setrobust(&attr, PTHREAD_MUTEX_ROBUST);\n"
666 "\\&\n"
667 " pthread_mutex_init(&mtx, &attr);\n"
668 "\\&\n"
669 " pthread_create(&thr, NULL, original_owner_thread, NULL);\n"
670 "\\&\n"
671 " sleep(2);\n"
672 "\\&\n"
673 " /* \"original_owner_thread\" should have exited by now. */\n"
674 "\\&\n"
675 " printf(\"[main] Attempting to lock the robust mutex.\\[rs]n\");\n"
676 " s = pthread_mutex_lock(&mtx);\n"
677 " if (s == EOWNERDEAD) {\n"
678 " printf(\"[main] pthread_mutex_lock() returned EOWNERDEAD\\[rs]n\");\n"
679 " printf(\"[main] Now make the mutex consistent\\[rs]n\");\n"
680 " s = pthread_mutex_consistent(&mtx);\n"
681 " if (s != 0)\n"
682 " handle_error_en(s, \"pthread_mutex_consistent\");\n"
683 " printf(\"[main] Mutex is now consistent; unlocking\\[rs]n\");\n"
684 " s = pthread_mutex_unlock(&mtx);\n"
685 " if (s != 0)\n"
686 " handle_error_en(s, \"pthread_mutex_unlock\");\n"
687 "\\&\n"
688 " exit(EXIT_SUCCESS);\n"
689 " } else if (s == 0) {\n"
690 " printf(\"[main] pthread_mutex_lock() unexpectedly succeeded\\[rs]n\");\n"
691 " exit(EXIT_FAILURE);\n"
692 " } else {\n"
693 " printf(\"[main] pthread_mutex_lock() unexpectedly failed\\[rs]n\");\n"
694 " handle_error_en(s, \"pthread_mutex_lock\");\n"
695 " }\n"
696 "}\n"
697 msgstr ""
698 "#include E<lt>errno.hE<gt>\n"
699 "#include E<lt>pthread.hE<gt>\n"
700 "#include E<lt>stdio.hE<gt>\n"
701 "#include E<lt>stdlib.hE<gt>\n"
702 "#include E<lt>unistd.hE<gt>\n"
703 "\\&\n"
704 "#define handle_error_en(en, msg) \\[rs]\n"
705 " do { errno = en; perror(msg); exit(EXIT_FAILURE); } while (0)\n"
706 "\\&\n"
707 "static pthread_mutex_t mtx;\n"
708 "\\&\n"
709 "static void *\n"
710 "original_owner_thread(void *ptr)\n"
711 "{\n"
712 " printf(\"[original owner] Setting lock...\\[rs]n\");\n"
713 " pthread_mutex_lock(&mtx);\n"
714 " printf(\"[original owner] Locked. Now exiting without unlocking.\\[rs]n\");\n"
715 " pthread_exit(NULL);\n"
716 "}\n"
717 "\\&\n"
718 "int\n"
719 "main(void)\n"
720 "{\n"
721 " pthread_t thr;\n"
722 " pthread_mutexattr_t attr;\n"
723 " int s;\n"
724 "\\&\n"
725 " pthread_mutexattr_init(&attr);\n"
726 "\\&\n"
727 " pthread_mutexattr_setrobust(&attr, PTHREAD_MUTEX_ROBUST);\n"
728 "\\&\n"
729 " pthread_mutex_init(&mtx, &attr);\n"
730 "\\&\n"
731 " pthread_create(&thr, NULL, original_owner_thread, NULL);\n"
732 "\\&\n"
733 " sleep(2);\n"
734 "\\&\n"
735 " /* \"original_owner_thread\" should have exited by now. */\n"
736 "\\&\n"
737 " printf(\"[main] Attempting to lock the robust mutex.\\[rs]n\");\n"
738 " s = pthread_mutex_lock(&mtx);\n"
739 " if (s == EOWNERDEAD) {\n"
740 " printf(\"[main] pthread_mutex_lock() returned EOWNERDEAD\\[rs]n\");\n"
741 " printf(\"[main] Now make the mutex consistent\\[rs]n\");\n"
742 " s = pthread_mutex_consistent(&mtx);\n"
743 " if (s != 0)\n"
744 " handle_error_en(s, \"pthread_mutex_consistent\");\n"
745 " printf(\"[main] Mutex is now consistent; unlocking\\[rs]n\");\n"
746 " s = pthread_mutex_unlock(&mtx);\n"
747 " if (s != 0)\n"
748 " handle_error_en(s, \"pthread_mutex_unlock\");\n"
749 "\\&\n"
750 " exit(EXIT_SUCCESS);\n"
751 " } else if (s == 0) {\n"
752 " printf(\"[main] pthread_mutex_lock() unexpectedly succeeded\\[rs]n\");\n"
753 " exit(EXIT_FAILURE);\n"
754 " } else {\n"
755 " printf(\"[main] pthread_mutex_lock() unexpectedly failed\\[rs]n\");\n"
756 " handle_error_en(s, \"pthread_mutex_lock\");\n"
757 " }\n"
758 "}\n"
759
760 #. type: TH
761 #: fedora-44 fedora-rawhide
762 #, no-wrap
763 msgid "2024-07-23"
764 msgstr "23 يوليو 2024"
765
766 #. type: TH
767 #: fedora-44 fedora-rawhide
768 #, no-wrap
769 msgid "Linux man-pages 6.13"
770 msgstr "صفحات دليل لينكس 6.13"
771
772 #. type: TH
773 #: mageia-cauldron
774 #, no-wrap
775 msgid "Linux man-pages 6.17"
776 msgstr "صفحات دليل لينكس 6.17"
777
778 #. type: TH
779 #: opensuse-leap-16-1 opensuse-tumbleweed
780 #, no-wrap
781 msgid "Linux man-pages (unreleased)"
782 msgstr "صفحات دليل لينكس (لم تصدر بعد)"