# 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_key_create" 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_key_create, pthread_key_delete, pthread_setspecific, " "pthread_getspecific - management of thread-specific data" 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<,>\n" "B< void (*>IB<) (void *));>\n" "BIB<);>\n" "BIB<, const void *>IB<);>\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-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-tumbleweed msgid "" "Programs often need global or static variables that have different values in " "different threads. Since threads share one memory space, this cannot be " "achieved with regular variables. Thread-specific data is the POSIX threads " "answer to this need." msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-tumbleweed msgid "" "Each thread possesses a private memory block, the thread-specific data area, " "or TSD area for short. This area is indexed by TSD keys. The TSD area " "associates values of type B to TSD keys. TSD keys are common to all " "threads, but the value associated with a given TSD key can be different in " "each thread." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-tumbleweed msgid "" "For concreteness, the TSD areas can be viewed as arrays of B " "pointers, TSD keys as integer indices into these arrays, and the value of a " "TSD key as the value of the corresponding array element in the calling " "thread." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-tumbleweed msgid "" "When a thread is created, its TSD area initially associates B with all " "keys." msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-tumbleweed msgid "" "B allocates a new TSD key. The key is stored in the " "location pointed to by I. There is a limit of B on " "the number of keys allocated at a given time. The value initially " "associated with the returned key is B in all currently executing " "threads." msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-rawhide opensuse-tumbleweed msgid "" "The I argument, if not B, specifies a destructor " "function associated with the key. When a thread terminates via " "B or by cancelation, I is called with " "arguments the value associated with the key in that thread. The " "I is not called if that value is B. The order in " "which destructor functions are called at thread termination time is " "unspecified." msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-tumbleweed msgid "" "Before the destructor function is called, the B value is associated " "with the key in the current thread. A destructor function might, however, " "re-associate non-B values to that key or some other key. To deal with " "this, if after all the destructors have been called for all non-B " "values, there are still some non-B values with associated destructors, " "then the process is repeated. The glibc implementation stops the process " "after B iterations, even if some non-B " "values with associated descriptors remain. Other implementations may loop " "indefinitely." msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-tumbleweed msgid "" "B deallocates a TSD key. It does not check whether non-" "B values are associated with that key in the currently executing " "threads, nor call the destructor function associated with the key." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-tumbleweed msgid "" "B changes the value associated with I in the " "calling thread, storing the given I instead." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-tumbleweed msgid "" "B returns the value currently associated with I in " "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, B, and B " "return 0 on success and a non-zero error code on failure. If successful, " "B stores the newly allocated key in the location pointed " "to by its I argument." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-tumbleweed msgid "" "B returns the value associated with I on success, " "and B 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 "B 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 "B keys are already allocated." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-tumbleweed msgid "" "B and B return 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 "I is not a valid, allocated TSD key." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-tumbleweed msgid "" "B returns B if I is not a valid, allocated " "TSD key." 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 "pthread_create(3), pthread_exit(3), pthread_testcancel(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-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-tumbleweed msgid "" "The following code fragment allocates a thread-specific array of 100 " "characters, with automatic reclamation at thread exit:" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-tumbleweed #, no-wrap msgid "" "B\n" msgstr "" #. type: TH #: debian-bookworm #, no-wrap msgid "PTHREAD_SPECIFIC" 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<, void " "(*>IB<) (void *));>" msgstr "" #. type: Plain text #: debian-bookworm msgid "BIB<);>" msgstr "" #. type: Plain text #: debian-bookworm msgid "" "BIB<, const void " "*>IB<);>" msgstr "" #. type: Plain text #: debian-bookworm msgid "BIB<);>" msgstr "" #. type: Plain text #: debian-bookworm msgid "" "Programs often need global or static variables that have different values in " "different threads. Since threads share one memory space, this cannot be " "achieved with regular variables. Thread-specific data is the POSIX threads " "answer to this need." msgstr "" #. type: Plain text #: debian-bookworm msgid "" "Each thread possesses a private memory block, the thread-specific data area, " "or TSD area for short. This area is indexed by TSD keys. The TSD area " "associates values of type B to TSD keys. TSD keys are common to all " "threads, but the value associated with a given TSD key can be different in " "each thread." msgstr "" #. type: Plain text #: debian-bookworm msgid "" "B allocates a new TSD key. The key is stored in the " "location pointed to by I. There is a limit of B on " "the number of keys allocated at a given time. The value initially associated " "with the returned key is B in all currently executing threads." msgstr "" #. type: Plain text #: debian-bookworm msgid "" "The I argument, if not B, specifies a destructor " "function associated with the key. When a thread terminates via " "B or by cancellation, I is called with " "arguments the value associated with the key in that thread. The " "I is not called if that value is B. The order in which " "destructor functions are called at thread termination time is unspecified." msgstr "" #. type: Plain text #: debian-bookworm msgid "" "Before the destructor function is called, the B value is associated " "with the key in the current thread. A destructor function might, however, " "re-associate non-B values to that key or some other key. To deal with " "this, if after all the destructors have been called for all non-B " "values, there are still some non-B values with associated destructors, " "then the process is repeated. The LinuxThreads implementation stops the " "process after B iterations, even if some non-" "B values with associated descriptors remain. Other implementations " "may loop indefinitely." msgstr "" #. type: Plain text #: debian-bookworm msgid "" "B deallocates a TSD key. It does not check whether non-" "B values are associated with that key in the currently executing " "threads, nor call the destructor function associated with the key." msgstr "" #. type: Plain text #: debian-bookworm msgid "" "B, B, and B " "return 0 on success and a non-zero error code on failure. If successful, " "B stores the newly allocated key in the location pointed " "to by its I argument." msgstr "" #. type: Plain text #: debian-bookworm msgid "B keys are already allocated" msgstr "" #. type: Plain text #: debian-bookworm msgid "I is not a valid, allocated TSD key" msgstr "" #. type: SH #: debian-bookworm #, no-wrap msgid "AUTHOR" msgstr "" #. type: Plain text #: debian-bookworm msgid "Xavier Leroy EXavier.Leroy@inria.frE" msgstr "" #. type: Plain text #: debian-bookworm msgid "" "The following code fragment allocates a thread-specific array of 100 " "characters, with automatic reclaimation at thread exit:" msgstr "" #. type: Plain text #: debian-bookworm #, no-wrap msgid "" "B\n" msgstr "" #. type: Plain text #: debian-bookworm #, no-wrap msgid "" "B\n" msgstr "" #. type: Plain text #: debian-bookworm #, no-wrap msgid "" "B\n" msgstr "" #. type: Plain text #: debian-bookworm #, no-wrap msgid "" "B\n" msgstr "" #. type: Plain text #: debian-bookworm #, no-wrap msgid "" "B\n" msgstr "" #. type: Plain text #: debian-bookworm #, no-wrap msgid "" "B\n" msgstr "" #. type: TH #: fedora-40 mageia-cauldron #, no-wrap msgid "2023-11-24" 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<, void " "(*>IB<) (void *));> BIB<);> BIB<, const void " "*>IB<);> BIB<);>" msgstr "" #. type: Plain text #: fedora-40 mageia-cauldron msgid "" "The I argument, if not B, specifies a destructor " "function associated with the key. When a thread terminates via " "B or by cancellation, I is called with " "arguments the value associated with the key in that thread. The " "I is not called if that value is B. The order in " "which destructor functions are called at thread termination time is " "unspecified." 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 ""