# SOME DESCRIPTIVE TITLE # Copyright (C) YEAR Free Software Foundation, Inc. # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "POT-Creation-Date: 2024-06-01 06:13+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #. type: TH #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-tumbleweed #, no-wrap msgid "pthread_mutex_init" msgstr "" #. type: TH #: archlinux debian-unstable opensuse-tumbleweed #, no-wrap msgid "2024-05-19" msgstr "" #. type: TH #: archlinux debian-unstable #, no-wrap msgid "Linux man-pages 6.8" msgstr "" #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-tumbleweed #, no-wrap msgid "NAME" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-tumbleweed msgid "" "pthread_mutex_init, pthread_mutex_lock, pthread_mutex_trylock, " "pthread_mutex_unlock, pthread_mutex_destroy - operations on mutexes" msgstr "" #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-tumbleweed #, no-wrap msgid "SYNOPSIS" msgstr "" #. type: Plain text #: archlinux debian-unstable opensuse-tumbleweed #, no-wrap msgid "B<#include Epthread.hE>\n" msgstr "" #. type: Plain text #: archlinux debian-unstable opensuse-tumbleweed #, no-wrap msgid "" "BIB< = PTHREAD_MUTEX_INITIALIZER;>\n" "BIB< = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;>\n" "BIB< = PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP;>\n" msgstr "" #. type: Plain text #: archlinux debian-unstable opensuse-tumbleweed #, no-wrap msgid "" "BIB<,>\n" "B< const pthread_mutexattr_t *>IB<);>\n" "BIB<);>\n" "BIB<);>\n" "BIB<);>\n" "BIB<);>\n" msgstr "" #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-tumbleweed #, no-wrap msgid "DESCRIPTION" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-tumbleweed msgid "" "A mutex is a MUTual EXclusion device, and is useful for protecting shared " "data structures from concurrent modifications, and implementing critical " "sections and monitors." msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-tumbleweed msgid "" "A mutex has two possible states: unlocked (not owned by any thread), and " "locked (owned by one thread). A mutex can never be owned by two different " "threads simultaneously. A thread attempting to lock a mutex that is already " "locked by another thread is suspended until the owning thread unlocks the " "mutex first." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-tumbleweed msgid "" "B initializes the mutex object pointed to by I " "according to the mutex attributes specified in I. If " "I is B, default attributes are used instead." msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-tumbleweed msgid "" "The LinuxThreads implementation supports only one mutex attributes, the " "I, which is either ``fast'', ``recursive'', or ``error " "checking''. The kind of a mutex determines whether it can be locked again " "by a thread that already owns it. The default kind is ``fast''. See " "B(3) for more information on mutex attributes." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-tumbleweed msgid "" "Variables of type B can also be initialized statically, " "using the constants B (for fast mutexes), " "B (for recursive mutexes), and " "B (for error checking mutexes)." msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-tumbleweed msgid "" "B locks the given mutex. If the mutex is currently " "unlocked, it becomes locked and owned by the calling thread, and " "B returns immediately. If the mutex is already locked " "by another thread, B suspends the calling thread until " "the mutex is unlocked." msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-tumbleweed msgid "" "If the mutex is already locked by the calling thread, the behavior of " "B depends on the kind of the mutex. If the mutex is of " "the ``fast'' kind, the calling thread is suspended until the mutex is " "unlocked, thus effectively causing the calling thread to deadlock. If the " "mutex is of the ``error checking'' kind, B returns " "immediately with the error code B. If the mutex is of the " "``recursive'' kind, B succeeds and returns immediately, " "recording the number of times the calling thread has locked the mutex. An " "equal number of B operations must be performed before " "the mutex returns to the unlocked state." msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-tumbleweed msgid "" "B behaves identically to B, " "except that it does not block the calling thread if the mutex is already " "locked by another thread (or by the calling thread in the case of a ``fast'' " "mutex). Instead, B returns immediately with the " "error code B." msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-tumbleweed msgid "" "B unlocks the given mutex. The mutex is assumed to be " "locked and owned by the calling thread on entrance to " "B. If the mutex is of the ``fast'' kind, " "B always returns it to the unlocked state. If it is " "of the ``recursive'' kind, it decrements the locking count of the mutex " "(number of B operations performed on it by the calling " "thread), and only when this count reaches zero is the mutex actually " "unlocked." msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-tumbleweed msgid "" "On ``error checking'' and ``recursive'' mutexes, B " "actually checks at run-time that the mutex is locked on entrance, and that " "it was locked by the same thread that is now calling " "B. If these conditions are not met, an error code is " "returned and the mutex remains unchanged. ``Fast'' mutexes perform no such " "checks, thus allowing a locked mutex to be unlocked by a thread other than " "its owner. This is non-portable behavior and must not be relied upon." msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-tumbleweed msgid "" "B destroys a mutex object, freeing the resources it " "might hold. The mutex must be unlocked on entrance. In the LinuxThreads " "implementation, no resources are associated with mutex objects, thus " "B actually does nothing except checking that the " "mutex is unlocked." msgstr "" #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-tumbleweed #, no-wrap msgid "CANCELLATION" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-rawhide opensuse-tumbleweed msgid "" "None of the mutex functions is a cancelation point, not even " "B, in spite of the fact that it can suspend a thread for " "arbitrary durations. This way, the status of mutexes at cancelation points " "is predictable, allowing cancelation handlers to unlock precisely those " "mutexes that need to be unlocked before the thread stops executing. " "Consequently, threads using deferred cancelation should never hold a mutex " "for extended periods of time." msgstr "" #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-tumbleweed #, no-wrap msgid "ASYNC-SIGNAL SAFETY" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-tumbleweed msgid "" "The mutex functions are not async-signal safe. What this means is that they " "should not be called from a signal handler. In particular, calling " "B or B from a signal handler may " "deadlock the calling thread." msgstr "" #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-tumbleweed #, no-wrap msgid "RETURN VALUE" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-tumbleweed msgid "" "B always returns 0. The other mutex functions return 0 " "on success and a non-zero error code on error." msgstr "" #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-tumbleweed #, no-wrap msgid "ERRORS" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-tumbleweed msgid "" "The B function returns the following error code on error:" msgstr "" #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-tumbleweed #, no-wrap msgid "B" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-tumbleweed msgid "The mutex has not been properly initialized." msgstr "" #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-tumbleweed #, no-wrap msgid "B" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-tumbleweed msgid "" "The mutex is already locked by the calling thread (``error checking'' " "mutexes only)." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-tumbleweed msgid "" "The B function returns the following error codes on " "error:" msgstr "" #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-tumbleweed #, no-wrap msgid "B" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-tumbleweed msgid "The mutex could not be acquired because it was currently locked." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-tumbleweed msgid "" "The B function returns the following error code on " "error:" msgstr "" #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-tumbleweed #, no-wrap msgid "B" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-tumbleweed msgid "" "The calling thread does not own the mutex (``error checking'' mutexes only)." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-tumbleweed msgid "" "The B function returns the following error code on " "error:" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-tumbleweed msgid "The mutex is currently locked." msgstr "" #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-tumbleweed #, no-wrap msgid "SEE ALSO" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-tumbleweed msgid "" "B(3), B(3), " "B(3)." msgstr "" #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-tumbleweed #, no-wrap msgid "EXAMPLE" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-tumbleweed msgid "A shared global variable I can be protected by a mutex as follows:" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-tumbleweed #, no-wrap msgid "" "B\n" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-tumbleweed msgid "" "All accesses and modifications to I should be bracketed by calls to " "B and B as follows:" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-tumbleweed #, no-wrap msgid "" "B\n" msgstr "" #. type: TH #: debian-bookworm #, no-wrap msgid "PTHREAD_MUTEX" msgstr "" #. type: TH #: debian-bookworm #, no-wrap msgid "LinuxThreads" msgstr "" #. type: Plain text #: debian-bookworm fedora-40 fedora-rawhide mageia-cauldron msgid "B<#include Epthread.hE>" msgstr "" #. type: Plain text #: debian-bookworm msgid "BIB< = PTHREAD_MUTEX_INITIALIZER;>" msgstr "" #. type: Plain text #: debian-bookworm msgid "" "BIB< = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;>" msgstr "" #. type: Plain text #: debian-bookworm msgid "" "BIB< = " "PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP;>" msgstr "" #. type: Plain text #: debian-bookworm msgid "" "BIB<, const " "pthread_mutexattr_t *>IB<);>" msgstr "" #. type: Plain text #: debian-bookworm msgid "BIB<);>" msgstr "" #. type: Plain text #: debian-bookworm msgid "BIB<);>" msgstr "" #. type: Plain text #: debian-bookworm msgid "BIB<);>" msgstr "" #. type: Plain text #: debian-bookworm msgid "BIB<);>" msgstr "" #. type: Plain text #: debian-bookworm msgid "" "A mutex has two possible states: unlocked (not owned by any thread), and " "locked (owned by one thread). A mutex can never be owned by two different " "threads simultaneously. A thread attempting to lock a mutex that is already " "locked by another thread is suspended until the owning thread unlocks the " "mutex first." msgstr "" #. type: Plain text #: debian-bookworm msgid "" "The LinuxThreads implementation supports only one mutex attributes, the " "I, which is either ``fast'', ``recursive'', or ``error " "checking''. The kind of a mutex determines whether it can be locked again by " "a thread that already owns it. The default kind is ``fast''. See " "B(3) for more information on mutex attributes." msgstr "" #. type: Plain text #: debian-bookworm msgid "" "B locks the given mutex. If the mutex is currently " "unlocked, it becomes locked and owned by the calling thread, and " "B returns immediately. If the mutex is already locked by " "another thread, B suspends the calling thread until the " "mutex is unlocked." msgstr "" #. type: Plain text #: debian-bookworm msgid "" "If the mutex is already locked by the calling thread, the behavior of " "B depends on the kind of the mutex. If the mutex is of " "the ``fast'' kind, the calling thread is suspended until the mutex is " "unlocked, thus effectively causing the calling thread to deadlock. If the " "mutex is of the ``error checking'' kind, B returns " "immediately with the error code B. If the mutex is of the " "``recursive'' kind, B succeeds and returns immediately, " "recording the number of times the calling thread has locked the mutex. An " "equal number of B operations must be performed before " "the mutex returns to the unlocked state." msgstr "" #. type: Plain text #: debian-bookworm msgid "" "B behaves identically to B, " "except that it does not block the calling thread if the mutex is already " "locked by another thread (or by the calling thread in the case of a ``fast'' " "mutex). Instead, B returns immediately with the error " "code B." msgstr "" #. type: Plain text #: debian-bookworm msgid "" "B unlocks the given mutex. The mutex is assumed to be " "locked and owned by the calling thread on entrance to " "B. If the mutex is of the ``fast'' kind, " "B always returns it to the unlocked state. If it is of " "the ``recursive'' kind, it decrements the locking count of the mutex (number " "of B operations performed on it by the calling thread), " "and only when this count reaches zero is the mutex actually unlocked." msgstr "" #. type: Plain text #: debian-bookworm msgid "" "On ``error checking'' and ``recursive'' mutexes, B " "actually checks at run-time that the mutex is locked on entrance, and that " "it was locked by the same thread that is now calling " "B. If these conditions are not met, an error code is " "returned and the mutex remains unchanged. ``Fast'' mutexes perform no such " "checks, thus allowing a locked mutex to be unlocked by a thread other than " "its owner. This is non-portable behavior and must not be relied upon." msgstr "" #. type: Plain text #: debian-bookworm msgid "" "B destroys a mutex object, freeing the resources it " "might hold. The mutex must be unlocked on entrance. In the LinuxThreads " "implementation, no resources are associated with mutex objects, thus " "B actually does nothing except checking that the " "mutex is unlocked." msgstr "" #. type: Plain text #: debian-bookworm msgid "" "None of the mutex functions is a cancellation point, not even " "B, in spite of the fact that it can suspend a thread for " "arbitrary durations. This way, the status of mutexes at cancellation points " "is predictable, allowing cancellation handlers to unlock precisely those " "mutexes that need to be unlocked before the thread stops executing. " "Consequently, threads using deferred cancellation should never hold a mutex " "for extended periods of time." msgstr "" #. type: Plain text #: debian-bookworm msgid "" "The mutex functions are not async-signal safe. What this means is that they " "should not be called from a signal handler. In particular, calling " "B or B from a signal handler may " "deadlock the calling thread." msgstr "" #. type: Plain text #: debian-bookworm msgid "" "B always returns 0. The other mutex functions return 0 " "on success and a non-zero error code on error." msgstr "" #. type: Plain text #: debian-bookworm msgid "the mutex has not been properly initialized." msgstr "" #. type: Plain text #: debian-bookworm msgid "" "the mutex is already locked by the calling thread (``error checking'' " "mutexes only)." msgstr "" #. type: Plain text #: debian-bookworm msgid "the mutex could not be acquired because it was currently locked." msgstr "" #. type: Plain text #: debian-bookworm msgid "" "the calling thread does not own the mutex (``error checking'' mutexes only)." msgstr "" #. type: Plain text #: debian-bookworm msgid "the mutex is currently locked." msgstr "" #. type: SH #: debian-bookworm #, no-wrap msgid "AUTHOR" msgstr "" #. type: Plain text #: debian-bookworm msgid "Xavier Leroy EXavier.Leroy@inria.frE" msgstr "" #. type: TH #: fedora-40 mageia-cauldron #, no-wrap msgid "2023-10-31" msgstr "" #. type: TH #: fedora-40 mageia-cauldron #, no-wrap msgid "Linux man-pages 6.06" msgstr "" #. type: Plain text #: fedora-40 fedora-rawhide mageia-cauldron msgid "" "BIB< = PTHREAD_MUTEX_INITIALIZER;> " "BIB< = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;> " "BIB< = " "PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP;>" msgstr "" #. type: Plain text #: fedora-40 fedora-rawhide mageia-cauldron msgid "" "BIB<, const " "pthread_mutexattr_t *>IB<);> BIB<);> BIB<);> BIB<);> BIB<);>" msgstr "" #. type: Plain text #: fedora-40 mageia-cauldron msgid "" "None of the mutex functions is a cancellation point, not even " "B, in spite of the fact that it can suspend a thread for " "arbitrary durations. This way, the status of mutexes at cancellation points " "is predictable, allowing cancellation handlers to unlock precisely those " "mutexes that need to be unlocked before the thread stops executing. " "Consequently, threads using deferred cancellation should never hold a mutex " "for extended periods of time." msgstr "" #. type: TH #: fedora-rawhide #, no-wrap msgid "2024-02-26" msgstr "" #. type: TH #: fedora-rawhide #, no-wrap msgid "Linux man-pages 6.7" msgstr "" #. type: TH #: opensuse-tumbleweed #, no-wrap msgid "Linux man-pages (unreleased)" msgstr ""