Debian Codegraph @

templates/man3/pthread_mutex_init.3.pot

raw
1 # SOME DESCRIPTIVE TITLE
2 # Copyright (C) YEAR Free Software Foundation, Inc.
3 # This file is distributed under the same license as the PACKAGE package.
4 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5 #
6 #, fuzzy
7 msgid ""
8 msgstr ""
9 "Project-Id-Version: PACKAGE VERSION\n"
10 "POT-Creation-Date: 2026-06-05 06:38+0200\n"
11 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13 "Language-Team: LANGUAGE <[email protected]>\n"
14 "Language: \n"
15 "MIME-Version: 1.0\n"
16 "Content-Type: text/plain; charset=UTF-8\n"
17 "Content-Transfer-Encoding: 8bit\n"
18
19 #. type: TH
20 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
21 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
22 #, no-wrap
23 msgid "pthread_mutex_init"
24 msgstr ""
25
26 #. type: TH
27 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
28 #: opensuse-tumbleweed
29 #, no-wrap
30 msgid "2025-05-17"
31 msgstr ""
32
33 #. type: TH
34 #: archlinux debian-unstable
35 #, no-wrap
36 msgid "Linux man-pages 6.18"
37 msgstr ""
38
39 #. type: SH
40 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
41 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
42 #, no-wrap
43 msgid "NAME"
44 msgstr ""
45
46 #. type: Plain text
47 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
48 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
49 msgid ""
50 "pthread_mutex_init, pthread_mutex_lock, pthread_mutex_trylock, "
51 "pthread_mutex_unlock, pthread_mutex_destroy - operations on mutexes"
52 msgstr ""
53
54 #. type: SH
55 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
56 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
57 #, no-wrap
58 msgid "SYNOPSIS"
59 msgstr ""
60
61 #. type: Plain text
62 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
63 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
64 #, no-wrap
65 msgid "B<#include E<lt>pthread.hE<gt>>\n"
66 msgstr ""
67
68 #. type: Plain text
69 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
70 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
71 #, no-wrap
72 msgid ""
73 "B<pthread_mutex_t >I<fastmutex>B< = PTHREAD_MUTEX_INITIALIZER;>\n"
74 "B<pthread_mutex_t >I<recmutex>B< = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;>\n"
75 "B<pthread_mutex_t >I<errchkmutex>B< = PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP;>\n"
76 msgstr ""
77
78 #. type: Plain text
79 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
80 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
81 #, no-wrap
82 msgid ""
83 "B<int pthread_mutex_init(pthread_mutex_t *>I<mutex>B<,>\n"
84 "B< const pthread_mutexattr_t *>I<mutexattr>B<);>\n"
85 "B<int pthread_mutex_lock(pthread_mutex_t *>I<mutex>B<);>\n"
86 "B<int pthread_mutex_trylock(pthread_mutex_t *>I<mutex>B<);>\n"
87 "B<int pthread_mutex_unlock(pthread_mutex_t *>I<mutex>B<);>\n"
88 "B<int pthread_mutex_destroy(pthread_mutex_t *>I<mutex>B<);>\n"
89 msgstr ""
90
91 #. type: SH
92 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
93 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
94 #, no-wrap
95 msgid "DESCRIPTION"
96 msgstr ""
97
98 #. type: Plain text
99 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
100 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
101 msgid ""
102 "A mutex is a MUTual EXclusion device, and is useful for protecting shared "
103 "data structures from concurrent modifications, and implementing critical "
104 "sections and monitors."
105 msgstr ""
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 ""
111 "A mutex has two possible states: unlocked (not owned by any thread), and "
112 "locked (owned by one thread). A mutex can never be owned by two different "
113 "threads simultaneously. A thread attempting to lock a mutex that is already "
114 "locked by another thread is suspended until the owning thread unlocks the "
115 "mutex first."
116 msgstr ""
117
118 #. type: Plain text
119 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
120 #: opensuse-tumbleweed
121 msgid ""
122 "B<pthread_mutex_init>() initializes the mutex object pointed to by I<mutex> "
123 "according to the mutex attributes specified in I<mutexattr>. If "
124 "I<mutexattr> is NULL, default attributes are used instead."
125 msgstr ""
126
127 #. type: Plain text
128 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
129 #: opensuse-tumbleweed
130 msgid ""
131 "The LinuxThreads implementation supports only one mutex attributes, the "
132 "I<mutex kind>, which is either \"fast\", \"recursive\", or \"error "
133 "checking\". The kind of a mutex determines whether it can be locked again "
134 "by a thread that already owns it. The default kind is \"fast\". See "
135 "B<pthread_mutexattr_init>(3) for more information on mutex attributes."
136 msgstr ""
137
138 #. type: Plain text
139 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
140 #: opensuse-tumbleweed
141 msgid ""
142 "Variables of type I<pthread_mutex_t> can also be initialized statically, "
143 "using the constants B<PTHREAD_MUTEX_INITIALIZER> (for fast mutexes), "
144 "B<PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP> (for recursive mutexes), and "
145 "B<PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP> (for error checking mutexes)."
146 msgstr ""
147
148 #. type: Plain text
149 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
150 #: opensuse-tumbleweed
151 msgid ""
152 "B<pthread_mutex_lock>() locks the given mutex. If the mutex is currently "
153 "unlocked, it becomes locked and owned by the calling thread, and "
154 "B<pthread_mutex_lock>() returns immediately. If the mutex is already "
155 "locked by another thread, B<pthread_mutex_lock>() suspends the calling "
156 "thread until the mutex is unlocked."
157 msgstr ""
158
159 #. type: Plain text
160 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
161 #: opensuse-tumbleweed
162 msgid ""
163 "If the mutex is already locked by the calling thread, the behavior of "
164 "B<pthread_mutex_lock>() depends on the kind of the mutex. If the mutex is "
165 "of the \"fast\" kind, the calling thread is suspended until the mutex is "
166 "unlocked, thus effectively causing the calling thread to deadlock. If the "
167 "mutex is of the \"error checking\" kind, B<pthread_mutex_lock>() returns "
168 "immediately with the error code B<EDEADLK>. If the mutex is of the "
169 "\"recursive\" kind, B<pthread_mutex_lock>() succeeds and returns "
170 "immediately, recording the number of times the calling thread has locked the "
171 "mutex. An equal number of B<pthread_mutex_unlock>() operations must be "
172 "performed before the mutex returns to the unlocked state."
173 msgstr ""
174
175 #. type: Plain text
176 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
177 #: opensuse-tumbleweed
178 msgid ""
179 "B<pthread_mutex_trylock>() behaves identically to B<pthread_mutex_lock>(), "
180 "except that it does not block the calling thread if the mutex is already "
181 "locked by another thread (or by the calling thread in the case of a \"fast\" "
182 "mutex). Instead, B<pthread_mutex_trylock>() returns immediately with the "
183 "error code B<EBUSY>."
184 msgstr ""
185
186 #. type: Plain text
187 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
188 #: opensuse-tumbleweed
189 msgid ""
190 "B<pthread_mutex_unlock>() unlocks the given mutex. The mutex is assumed to "
191 "be locked and owned by the calling thread on entrance to "
192 "B<pthread_mutex_unlock>(). If the mutex is of the \"fast\" kind, "
193 "B<pthread_mutex_unlock>() always returns it to the unlocked state. If it "
194 "is of the \"recursive\" kind, it decrements the locking count of the mutex "
195 "(number of B<pthread_mutex_lock>() operations performed on it by the "
196 "calling thread), and only when this count reaches zero is the mutex actually "
197 "unlocked."
198 msgstr ""
199
200 #. type: Plain text
201 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
202 #: opensuse-tumbleweed
203 msgid ""
204 "On \"error checking\" and \"recursive\" mutexes, B<pthread_mutex_unlock>() "
205 "actually checks at run-time that the mutex is locked on entrance, and that "
206 "it was locked by the same thread that is now calling "
207 "B<pthread_mutex_unlock>(). If these conditions are not met, an error code "
208 "is returned and the mutex remains unchanged. \"Fast\" mutexes perform no "
209 "such checks, thus allowing a locked mutex to be unlocked by a thread other "
210 "than its owner. This is non-portable behavior and must not be relied upon."
211 msgstr ""
212
213 #. type: Plain text
214 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
215 #: opensuse-tumbleweed
216 msgid ""
217 "B<pthread_mutex_destroy>() destroys a mutex object, freeing the resources "
218 "it might hold. The mutex must be unlocked on entrance. In the LinuxThreads "
219 "implementation, no resources are associated with mutex objects, thus "
220 "B<pthread_mutex_destroy>() actually does nothing except checking that the "
221 "mutex is unlocked."
222 msgstr ""
223
224 #. type: SH
225 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
226 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
227 #, no-wrap
228 msgid "CANCELLATION"
229 msgstr ""
230
231 #. type: Plain text
232 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
233 #: opensuse-tumbleweed
234 msgid ""
235 "None of the mutex functions is a cancelation point, not even "
236 "B<pthread_mutex_lock>(), in spite of the fact that it can suspend a thread "
237 "for arbitrary durations. This way, the status of mutexes at cancelation "
238 "points is predictable, allowing cancelation handlers to unlock precisely "
239 "those mutexes that need to be unlocked before the thread stops executing. "
240 "Consequently, threads using deferred cancelation should never hold a mutex "
241 "for extended periods of time."
242 msgstr ""
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 "ASYNC-SIGNAL SAFETY"
249 msgstr ""
250
251 #. type: Plain text
252 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
253 #: opensuse-tumbleweed
254 msgid ""
255 "The mutex functions are not async-signal safe. What this means is that they "
256 "should not be called from a signal handler. In particular, calling "
257 "B<pthread_mutex_lock>() or B<pthread_mutex_unlock>() from a signal handler "
258 "may deadlock the calling thread."
259 msgstr ""
260
261 #. type: SH
262 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
263 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
264 #, no-wrap
265 msgid "RETURN VALUE"
266 msgstr ""
267
268 #. type: Plain text
269 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
270 #: opensuse-tumbleweed
271 msgid ""
272 "B<pthread_mutex_init>() always returns 0. The other mutex functions return "
273 "0 on success and a non-zero error code on error."
274 msgstr ""
275
276 #. type: SH
277 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
278 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
279 #, no-wrap
280 msgid "ERRORS"
281 msgstr ""
282
283 #. type: Plain text
284 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
285 #: opensuse-tumbleweed
286 msgid ""
287 "The B<pthread_mutex_lock>() function returns the following error code on "
288 "error:"
289 msgstr ""
290
291 #. type: TP
292 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
293 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
294 #, no-wrap
295 msgid "B<EINVAL>"
296 msgstr ""
297
298 #. type: Plain text
299 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
300 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
301 msgid "The mutex has not been properly initialized."
302 msgstr ""
303
304 #. type: TP
305 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
306 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
307 #, no-wrap
308 msgid "B<EDEADLK>"
309 msgstr ""
310
311 #. type: Plain text
312 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
313 #: opensuse-tumbleweed
314 msgid ""
315 "The mutex is already locked by the calling thread (\"error checking\" "
316 "mutexes only)."
317 msgstr ""
318
319 #. type: Plain text
320 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
321 #: opensuse-tumbleweed
322 msgid ""
323 "The B<pthread_mutex_trylock>() function returns the following error codes "
324 "on error:"
325 msgstr ""
326
327 #. type: TP
328 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
329 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
330 #, no-wrap
331 msgid "B<EBUSY>"
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 "The mutex could not be acquired because it was currently locked."
338 msgstr ""
339
340 #. type: Plain text
341 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
342 #: opensuse-tumbleweed
343 msgid ""
344 "The B<pthread_mutex_unlock>() function returns the following error code on "
345 "error:"
346 msgstr ""
347
348 #. type: TP
349 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
350 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
351 #, no-wrap
352 msgid "B<EPERM>"
353 msgstr ""
354
355 #. type: Plain text
356 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
357 #: opensuse-tumbleweed
358 msgid ""
359 "The calling thread does not own the mutex (\"error checking\" mutexes only)."
360 msgstr ""
361
362 #. type: Plain text
363 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
364 #: opensuse-tumbleweed
365 msgid ""
366 "The B<pthread_mutex_destroy>() function returns the following error code on "
367 "error:"
368 msgstr ""
369
370 #. type: Plain text
371 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
372 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
373 msgid "The mutex is currently locked."
374 msgstr ""
375
376 #. type: SH
377 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
378 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
379 #, no-wrap
380 msgid "SEE ALSO"
381 msgstr ""
382
383 #. type: Plain text
384 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
385 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
386 msgid ""
387 "B<pthread_mutexattr_init>(3), B<pthread_mutexattr_setkind_np>(3), "
388 "B<pthread_cancel>(3)."
389 msgstr ""
390
391 #. type: SH
392 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
393 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
394 #, no-wrap
395 msgid "EXAMPLE"
396 msgstr ""
397
398 #. type: Plain text
399 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
400 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
401 msgid "A shared global variable I<x> can be protected by a mutex as follows:"
402 msgstr ""
403
404 #. type: Plain text
405 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
406 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
407 #, no-wrap
408 msgid ""
409 "B<int x;\n"
410 "pthread_mutex_t mut = PTHREAD_MUTEX_INITIALIZER;>\n"
411 msgstr ""
412
413 #. type: Plain text
414 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
415 #: opensuse-tumbleweed
416 msgid ""
417 "All accesses and modifications to I<x> should be bracketed by calls to "
418 "B<pthread_mutex_lock>() and B<pthread_mutex_unlock>() as follows:"
419 msgstr ""
420
421 #. type: Plain text
422 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
423 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
424 #, no-wrap
425 msgid ""
426 "B<pthread_mutex_lock(&mut);\n"
427 "/* operate on x */\n"
428 "pthread_mutex_unlock(&mut);>\n"
429 msgstr ""
430
431 #. type: TH
432 #: debian-trixie fedora-44 fedora-rawhide
433 #, no-wrap
434 msgid "2024-06-16"
435 msgstr ""
436
437 #. type: TH
438 #: debian-trixie
439 #, no-wrap
440 msgid "Linux man-pages 6.9.1"
441 msgstr ""
442
443 #. type: Plain text
444 #: debian-trixie fedora-44 fedora-rawhide
445 msgid ""
446 "B<pthread_mutex_init> initializes the mutex object pointed to by I<mutex> "
447 "according to the mutex attributes specified in I<mutexattr>. If "
448 "I<mutexattr> is B<NULL>, default attributes are used instead."
449 msgstr ""
450
451 #. type: Plain text
452 #: debian-trixie fedora-44 fedora-rawhide
453 msgid ""
454 "The LinuxThreads implementation supports only one mutex attributes, the "
455 "I<mutex kind>, which is either ``fast'', ``recursive'', or ``error "
456 "checking''. The kind of a mutex determines whether it can be locked again "
457 "by a thread that already owns it. The default kind is ``fast''. See "
458 "B<pthread_mutexattr_init>(3) for more information on mutex attributes."
459 msgstr ""
460
461 #. type: Plain text
462 #: debian-trixie fedora-44 fedora-rawhide
463 msgid ""
464 "Variables of type B<pthread_mutex_t> can also be initialized statically, "
465 "using the constants B<PTHREAD_MUTEX_INITIALIZER> (for fast mutexes), "
466 "B<PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP> (for recursive mutexes), and "
467 "B<PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP> (for error checking mutexes)."
468 msgstr ""
469
470 #. type: Plain text
471 #: debian-trixie fedora-44 fedora-rawhide
472 msgid ""
473 "B<pthread_mutex_lock> locks the given mutex. If the mutex is currently "
474 "unlocked, it becomes locked and owned by the calling thread, and "
475 "B<pthread_mutex_lock> returns immediately. If the mutex is already locked "
476 "by another thread, B<pthread_mutex_lock> suspends the calling thread until "
477 "the mutex is unlocked."
478 msgstr ""
479
480 #. type: Plain text
481 #: debian-trixie fedora-44 fedora-rawhide
482 msgid ""
483 "If the mutex is already locked by the calling thread, the behavior of "
484 "B<pthread_mutex_lock> depends on the kind of the mutex. If the mutex is of "
485 "the ``fast'' kind, the calling thread is suspended until the mutex is "
486 "unlocked, thus effectively causing the calling thread to deadlock. If the "
487 "mutex is of the ``error checking'' kind, B<pthread_mutex_lock> returns "
488 "immediately with the error code B<EDEADLK>. If the mutex is of the "
489 "``recursive'' kind, B<pthread_mutex_lock> succeeds and returns immediately, "
490 "recording the number of times the calling thread has locked the mutex. An "
491 "equal number of B<pthread_mutex_unlock> operations must be performed before "
492 "the mutex returns to the unlocked state."
493 msgstr ""
494
495 #. type: Plain text
496 #: debian-trixie fedora-44 fedora-rawhide
497 msgid ""
498 "B<pthread_mutex_trylock> behaves identically to B<pthread_mutex_lock>, "
499 "except that it does not block the calling thread if the mutex is already "
500 "locked by another thread (or by the calling thread in the case of a ``fast'' "
501 "mutex). Instead, B<pthread_mutex_trylock> returns immediately with the "
502 "error code B<EBUSY>."
503 msgstr ""
504
505 #. type: Plain text
506 #: debian-trixie fedora-44 fedora-rawhide
507 msgid ""
508 "B<pthread_mutex_unlock> unlocks the given mutex. The mutex is assumed to be "
509 "locked and owned by the calling thread on entrance to "
510 "B<pthread_mutex_unlock>. If the mutex is of the ``fast'' kind, "
511 "B<pthread_mutex_unlock> always returns it to the unlocked state. If it is "
512 "of the ``recursive'' kind, it decrements the locking count of the mutex "
513 "(number of B<pthread_mutex_lock> operations performed on it by the calling "
514 "thread), and only when this count reaches zero is the mutex actually "
515 "unlocked."
516 msgstr ""
517
518 #. type: Plain text
519 #: debian-trixie fedora-44 fedora-rawhide
520 msgid ""
521 "On ``error checking'' and ``recursive'' mutexes, B<pthread_mutex_unlock> "
522 "actually checks at run-time that the mutex is locked on entrance, and that "
523 "it was locked by the same thread that is now calling "
524 "B<pthread_mutex_unlock>. If these conditions are not met, an error code is "
525 "returned and the mutex remains unchanged. ``Fast'' mutexes perform no such "
526 "checks, thus allowing a locked mutex to be unlocked by a thread other than "
527 "its owner. This is non-portable behavior and must not be relied upon."
528 msgstr ""
529
530 #. type: Plain text
531 #: debian-trixie fedora-44 fedora-rawhide
532 msgid ""
533 "B<pthread_mutex_destroy> destroys a mutex object, freeing the resources it "
534 "might hold. The mutex must be unlocked on entrance. In the LinuxThreads "
535 "implementation, no resources are associated with mutex objects, thus "
536 "B<pthread_mutex_destroy> actually does nothing except checking that the "
537 "mutex is unlocked."
538 msgstr ""
539
540 #. type: Plain text
541 #: debian-trixie fedora-44 fedora-rawhide
542 msgid ""
543 "None of the mutex functions is a cancelation point, not even "
544 "B<pthread_mutex_lock>, in spite of the fact that it can suspend a thread for "
545 "arbitrary durations. This way, the status of mutexes at cancelation points "
546 "is predictable, allowing cancelation handlers to unlock precisely those "
547 "mutexes that need to be unlocked before the thread stops executing. "
548 "Consequently, threads using deferred cancelation should never hold a mutex "
549 "for extended periods of time."
550 msgstr ""
551
552 #. type: Plain text
553 #: debian-trixie fedora-44 fedora-rawhide
554 msgid ""
555 "The mutex functions are not async-signal safe. What this means is that they "
556 "should not be called from a signal handler. In particular, calling "
557 "B<pthread_mutex_lock> or B<pthread_mutex_unlock> from a signal handler may "
558 "deadlock the calling thread."
559 msgstr ""
560
561 #. type: Plain text
562 #: debian-trixie fedora-44 fedora-rawhide
563 msgid ""
564 "B<pthread_mutex_init> always returns 0. The other mutex functions return 0 "
565 "on success and a non-zero error code on error."
566 msgstr ""
567
568 #. type: Plain text
569 #: debian-trixie fedora-44 fedora-rawhide
570 msgid ""
571 "The B<pthread_mutex_lock> function returns the following error code on error:"
572 msgstr ""
573
574 #. type: Plain text
575 #: debian-trixie fedora-44 fedora-rawhide
576 msgid ""
577 "The mutex is already locked by the calling thread (``error checking'' "
578 "mutexes only)."
579 msgstr ""
580
581 #. type: Plain text
582 #: debian-trixie fedora-44 fedora-rawhide
583 msgid ""
584 "The B<pthread_mutex_trylock> function returns the following error codes on "
585 "error:"
586 msgstr ""
587
588 #. type: Plain text
589 #: debian-trixie fedora-44 fedora-rawhide
590 msgid ""
591 "The B<pthread_mutex_unlock> function returns the following error code on "
592 "error:"
593 msgstr ""
594
595 #. type: Plain text
596 #: debian-trixie fedora-44 fedora-rawhide
597 msgid ""
598 "The calling thread does not own the mutex (``error checking'' mutexes only)."
599 msgstr ""
600
601 #. type: Plain text
602 #: debian-trixie fedora-44 fedora-rawhide
603 msgid ""
604 "The B<pthread_mutex_destroy> function returns the following error code on "
605 "error:"
606 msgstr ""
607
608 #. type: Plain text
609 #: debian-trixie fedora-44 fedora-rawhide
610 msgid ""
611 "All accesses and modifications to I<x> should be bracketed by calls to "
612 "B<pthread_mutex_lock> and B<pthread_mutex_unlock> as follows:"
613 msgstr ""
614
615 #. type: TH
616 #: fedora-44 fedora-rawhide
617 #, no-wrap
618 msgid "Linux man-pages 6.13"
619 msgstr ""
620
621 #. type: TH
622 #: mageia-cauldron
623 #, no-wrap
624 msgid "Linux man-pages 6.17"
625 msgstr ""
626
627 #. type: TH
628 #: opensuse-leap-16-1 opensuse-tumbleweed
629 #, no-wrap
630 msgid "Linux man-pages (unreleased)"
631 msgstr ""