get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/817693/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 817693,
    "url": "http://patchwork.ozlabs.org/api/patches/817693/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/glibc/patch/1506112024-22601-9-git-send-email-adhemerval.zanella@linaro.org/",
    "project": {
        "id": 41,
        "url": "http://patchwork.ozlabs.org/api/projects/41/?format=api",
        "name": "GNU C Library",
        "link_name": "glibc",
        "list_id": "libc-alpha.sourceware.org",
        "list_email": "libc-alpha@sourceware.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<1506112024-22601-9-git-send-email-adhemerval.zanella@linaro.org>",
    "list_archive_url": null,
    "date": "2017-09-22T20:27:04",
    "name": "[8/8] Add manual documentation for threads.h",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "8f66e9c062677f57a47a968d6ae6198e1ab8f8ff",
    "submitter": {
        "id": 66065,
        "url": "http://patchwork.ozlabs.org/api/people/66065/?format=api",
        "name": "Adhemerval Zanella Netto",
        "email": "adhemerval.zanella@linaro.org"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/glibc/patch/1506112024-22601-9-git-send-email-adhemerval.zanella@linaro.org/mbox/",
    "series": [
        {
            "id": 4704,
            "url": "http://patchwork.ozlabs.org/api/series/4704/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/glibc/list/?series=4704",
            "date": "2017-09-22T20:26:56",
            "name": "Add support for ISO C threads.h",
            "version": 7,
            "mbox": "http://patchwork.ozlabs.org/series/4704/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/817693/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/817693/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<libc-alpha-return-84881-incoming=patchwork.ozlabs.org@sourceware.org>",
        "X-Original-To": "incoming@patchwork.ozlabs.org",
        "Delivered-To": [
            "patchwork-incoming@bilbo.ozlabs.org",
            "mailing list libc-alpha@sourceware.org"
        ],
        "Authentication-Results": [
            "ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=sourceware.org\n\t(client-ip=209.132.180.131; helo=sourceware.org;\n\tenvelope-from=libc-alpha-return-84881-incoming=patchwork.ozlabs.org@sourceware.org;\n\treceiver=<UNKNOWN>)",
            "ozlabs.org; dkim=pass (1024-bit key;\n\tsecure) header.d=sourceware.org header.i=@sourceware.org\n\theader.b=\"Mf5B6UA/\"; dkim-atps=neutral",
            "sourceware.org; auth=none"
        ],
        "Received": [
            "from sourceware.org (server1.sourceware.org [209.132.180.131])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xzQ6l1Dd4z9t32\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat, 23 Sep 2017 06:28:46 +1000 (AEST)",
            "(qmail 67168 invoked by alias); 22 Sep 2017 20:27:30 -0000",
            "(qmail 67110 invoked by uid 89); 22 Sep 2017 20:27:30 -0000"
        ],
        "DomainKey-Signature": "a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id\n\t:list-unsubscribe:list-subscribe:list-archive:list-post\n\t:list-help:sender:from:to:cc:subject:date:message-id:in-reply-to\n\t:references; q=dns; s=default; b=ZuS4QbROe+cLIEVDj7gkaYKIP7LvHl6\n\tPWaoXN8IvxvMSnFTf/flIX4WBnxhjvhObiKDN4MKhgpM0bevy+xKTdQyZHZZhD/a\n\tXuCzZPDNdaxxblMjN5ED64krSNosQQ85Z5GsHxf1VRAYZk50j9Jlf1EbVVFO1SDT\n\tjS79XSzRDNTk=",
        "DKIM-Signature": "v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id\n\t:list-unsubscribe:list-subscribe:list-archive:list-post\n\t:list-help:sender:from:to:cc:subject:date:message-id:in-reply-to\n\t:references; s=default; bh=Kc9v+0pD+A5wLOKlFc5Pd8jt6XU=; b=Mf5B6\n\tUA//e9jOYyrQyasakLytG0XYbSwBq1hIloLy3MsUnZZpTtIPDEW4Jpt0goGGKfEm\n\tkrog8zFnourUElKxAffipRlEDBGVyUnizWCZLIynnzh5SAaeQHiP4x3doA2MI5Xo\n\tWs2HxtckTxe4VD0/vWzdgAj3mWQvbaoHxnWYQs=",
        "Mailing-List": "contact libc-alpha-help@sourceware.org; run by ezmlm",
        "Precedence": "bulk",
        "List-Id": "<libc-alpha.sourceware.org>",
        "List-Unsubscribe": "<mailto:libc-alpha-unsubscribe-incoming=patchwork.ozlabs.org@sourceware.org>",
        "List-Subscribe": "<mailto:libc-alpha-subscribe@sourceware.org>",
        "List-Archive": "<http://sourceware.org/ml/libc-alpha/>",
        "List-Post": "<mailto:libc-alpha@sourceware.org>",
        "List-Help": "<mailto:libc-alpha-help@sourceware.org>,\n\t<http://sourceware.org/ml/#faqs>",
        "Sender": "libc-alpha-owner@sourceware.org",
        "X-Virus-Found": "No",
        "X-Spam-SWARE-Status": "No, score=-26.4 required=5.0 tests=BAYES_00, GIT_PATCH_0,\n\tGIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE,\n\tRCVD_IN_SORBS_SPAM,\n\tSPF_PASS autolearn=ham version=3.3.2 spammy=mutual, ipc,\n\tacquiring, TSS",
        "X-HELO": "mail-qk0-f175.google.com",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=skDukZHN+ab2ANXygfBkgjH2niVl8KtGCWfs8CxoRzQ=;\n\tb=R1L4B7kEpNO25PYJjFESudrbqMR4vv/JF7hV9u3bG8cZYwaLz5X+que5CgG2CqTQij\n\texi/IMIgs3PN8I5THTjCfog2c0GWHGQ6azE+sBCMQeXZCWyHOhZLdXudcWVzvoXMNaRI\n\txWj14WCxYqPy5NorGpq+YXfJhsHHxpBHs1Qne3nb9a0BeqYWcMQqu4MyOKxBrDTj1Mo9\n\tD6PSo447UIRSC+F+VPam3TAH1hH08AmKgixhUS6pvH0HC88P4ZqPvzz7KzNsPPLJXUlT\n\tawVgGxYYdUo1U0ZlNJtJG5ykn/XTLhXoqIFB31VNAGn5gPtPAqrO3M48lAQvHojdYOeZ\n\teHsA==",
        "X-Gm-Message-State": "AHPjjUgevCZpI+jaNsZUrhR/xMJPWC/7G/qCz+I9KVcB7nSYmuupKP0/\n\thdge16Ytq0QgRTakbPT/GFx6yeV95jc=",
        "X-Google-Smtp-Source": "AOwi7QDuB9qjFpDUrMhn5LctLoHD2L3PXax1w6czBTvJ7nBGTn7wctdMo5AWYu391HzRVhdhcI611Q==",
        "X-Received": "by 10.55.74.133 with SMTP id x127mr477904qka.239.1506112044617; \n\tFri, 22 Sep 2017 13:27:24 -0700 (PDT)",
        "From": "Adhemerval Zanella <adhemerval.zanella@linaro.org>",
        "To": "libc-alpha@sourceware.org",
        "Cc": "Juan Manuel Torres Palma <j.m.torrespalma@gmail.com>",
        "Subject": "[PATCH 8/8] Add manual documentation for threads.h",
        "Date": "Fri, 22 Sep 2017 17:27:04 -0300",
        "Message-Id": "<1506112024-22601-9-git-send-email-adhemerval.zanella@linaro.org>",
        "In-Reply-To": "<1506112024-22601-1-git-send-email-adhemerval.zanella@linaro.org>",
        "References": "<1506112024-22601-1-git-send-email-adhemerval.zanella@linaro.org>"
    },
    "content": "From: Juan Manuel Torres Palma <j.m.torrespalma@gmail.com>\n\nThis patch updates the manual and adds a new chapter to the manual,\nexplaining types macros, constants and functions defined by ISO C11\nthreads.h standard.\n\n\t* manual/Makefile (chapters): Add isothreads.texi.\n\t* manual/isothreads.texi: New file. Add new chapter for ISO C11\n\tthreads documentation.\n---\n ChangeLog              |   4 +\n manual/Makefile        |   2 +-\n manual/isothreads.texi | 355 +++++++++++++++++++++++++++++++++++++++++++++++++\n 3 files changed, 360 insertions(+), 1 deletion(-)\n create mode 100644 manual/isothreads.texi",
    "diff": "diff --git a/manual/Makefile b/manual/Makefile\nindex 4ed63a8..e54e0cf 100644\n--- a/manual/Makefile\n+++ b/manual/Makefile\n@@ -39,7 +39,7 @@ chapters = $(addsuffix .texi, \\\n \t\t       pipe socket terminal syslog math arith time\t\\\n \t\t       resource setjmp signal startup process ipc job\t\\\n \t\t       nss users sysinfo conf crypt debug threads\t\\\n-\t\t       probes tunables)\n+\t\t       probes tunables isothreads)\n add-chapters = $(wildcard $(foreach d, $(add-ons), ../$d/$d.texi))\n appendices = lang.texi header.texi install.texi maint.texi platform.texi \\\n \t     contrib.texi\ndiff --git a/manual/isothreads.texi b/manual/isothreads.texi\nnew file mode 100644\nindex 0000000..bcdf127\n--- /dev/null\n+++ b/manual/isothreads.texi\n@@ -0,0 +1,355 @@\n+@node ISO Threads, , , Top\n+@chapter ISO C11 threads\n+\n+This chapter describes @theglibc{} ISO C11 threads implementation.\n+To have a deeper understanding of this API, is strongly recomended\n+to read ISO/IEC 9899:2011, section 7.26 where ISO C11 threads\n+are specified.\n+All types and function prototypes are declared in\n+@file{threads.h} header.\n+@pindex threads.h\n+\n+@menu\n+* Thread Creation and Control:: Support for basic threading.\n+* Call Once:: Single call macros and functions.\n+* Mutex:: Low level mechanism for mutual exclusion.\n+* Condition variable:: High level objects for thread synchronization.\n+* Thread-local storage:: Functions to support thread-local storage.\n+* C11 error types:: Symbolic constants that represent functions return value.\n+@end menu\n+\n+@node Thread Creation and Control, Call Once, , ISO Threads\n+@section Thread Creation and Control\n+\n+@Theglibc{} implements a set of functions that allow the user to easily\n+create and use threads. Many extra functionalities are provided to control\n+the behaviour of threads.  The following functions and types are defined:\n+\n+@deftp {Data Type} {thrd_t}\n+Unique object that identifies a thread unequivocally.\n+@end deftp\n+\n+@deftp {Data Type} {thrd_start_t}\n+It is a (@code{int (*)(void *)}) typedef that is passed to @code{thrd_create}\n+when creating a new thread.  Should point to the first function that thread\n+will run.\n+@end deftp\n+\n+@deftypefun int thrd_create (thrd_t *@var{thr}, thrd_start_t @var{func}, void *@var{arg})\n+@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}\n+Create a new thread executing the function @var{func}.  The object pointed\n+by @var{arg} will be taken as @var{func} arguments.  If successful,\n+@var{thr} is set to the new thread identifier.\n+@end deftypefun\n+\n+@deftypefun int thrd_equal (thrd_t @var{lhs}, thrd_t @var{rhs})\n+@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}\n+Checks whether @var{lhs} and @var{rhs} refer to the same thread.\n+@end deftypefun\n+\n+@deftypefun thrd_t thrd_current (void)\n+@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}\n+Returns the identifier of the calling thread.\n+@end deftypefun\n+\n+@deftypefun int thrd_sleep (const struct timespec *@var{time_point}, struct timespec *@var{remaining})\n+@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}\n+Blocks the execution of the current thread for at least until the wall-clock\n+time point pointed to by @var{time_point} has been reached.  This function\n+does not take an absolute time, but a duration that the thread is required\n+to be blocked.\n+\n+The sleep may resume earlier if a signal that is not ignored is received.\n+In such case, if remaining is not NULL, the remaining time duration is stored\n+into the object pointed to by @var{remaining}\n+@end deftypefun\n+\n+@deftypefun void thrd_yield (void)\n+@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}\n+Provides a hint to the implementation to reschedule the execution of threads,\n+allowing other threads to run.\n+@end deftypefun\n+\n+@deftypefun _Noreturn void thrd_exit (int @var{res})\n+@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}\n+Terminates execution of the calling thread and sets its result code to\n+@var{res}.\n+If this function is called from a single thread process, the call to this\n+function is equivalent to @code{exit(0)}.  Returning from a thread-start\n+function is equivalent to calling @code{thrd_exit}.\n+@end deftypefun\n+\n+@deftypefun int thrd_detach (thrd_t @var{thr})\n+@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}\n+Detaches the thread identified by @var{thr} from the current control thread.\n+The resources held by the thread will be freed automatically once the thread\n+exits.  The parent thread will never be notified by any @var{thr} signal.\n+@end deftypefun\n+\n+@deftypefun int thrd_join (thrd_t @var{thr}, int *@var{res})\n+@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}\n+Blocks the current thread until the thread identified by @var{thr} finishes\n+execution.  If @var{res} is not a null pointer, the result code of the thread\n+is put to the location pointed to by @var{res}.  The termination of the thread\n+synchronizes-with the completion of this function.\n+The behavior is undefined if the thread was previously detached or joined by\n+another thread.\n+@end deftypefun\n+\n+@node Call Once, Mutex, Thread Creation and Control, ISO Threads\n+@section Call Once\n+\n+In order to guarantee single access to a function, @theglibc implements a call\n+once function to allow unique access in case a function is required to be\n+called only once in presence of several threads.\n+\n+@deftp {Data Type} {once_flag}\n+Complete object type capable of holding a flag used by @code{call_once}\n+@end deftp\n+\n+@deftypevr Macro {} ONCE_FLAG_INIT\n+Value established to initialize an object of type @code{once_flag}.\n+@end deftypevr\n+\n+@deftypefun void call_once (once_flag *@var{flag}, void (*@var{func})(void))\n+@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}\n+Calls function @var{func} exactly once, even if invoked from several threads.\n+The completion of the function @var{func} synchronizes with all previous or\n+subsequent calls to @code{call_once} with the same @var{flag} variable.\n+@end deftypefun\n+\n+@node Mutex, Condition variable, Call Once, ISO Threads\n+@section Mutex\n+\n+To have a better control of resources and how threads access them, @theglibc{}\n+also implements a mutex object, that allows to avoid race conditions and some\n+other concurrency issues.\n+\n+@deftp {Data Type} {mtx_t}\n+Mutex object identifier.\n+@end deftp\n+\n+@deftypefun int mtx_init (mtx_t *@var{mutex}, int @var{type})\n+@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}\n+Creates a new mutex object with type @var{type}. The object pointed to by\n+@var{mutex} is set to an identifier of the newly created mutex.\n+@end deftypefun\n+\n+@deftypefun int mtx_lock (mtx_t *@var{mutex})\n+@safety{@prelim{}@mtsafe{}@asunsafe{@asulock{}}@acunsafe{@aculock{}}} Blocks\n+the current thread until the mutex pointed to by @var{mutex} is locked.\n+The behavior is undefined if the current thread has already locked the mutex\n+and the mutex is not recursive.\n+Prior calls to @code{mtx_unlock} on the same mutex synchronize-with this\n+operation, and all lock/unlock operations on any given mutex form a single\n+total order (similar to the modification order of an atomic).\n+@end deftypefun\n+\n+@deftypefun int mtx_timedlock (mtx_t *restrict @var{mutex}, const struct timespec *restrict @var{time_point})\n+@safety{@prelim{}@mtsafe{}@asunsafe{@asulock{}}@acunsafe{@aculock{}}}\n+Blocks the current thread until the mutex pointed to by @var{mutex} is locked\n+or until the wall-clock time pointed to by @var{time_point} has been reached.\n+This function takes an absolute time, so if a duration is required, must be\n+calculated manually and passed to this function.\n+\n+The behavior is undefined if the current thread has already locked the mutex\n+and the mutex is not recursive.  The behavior is undefined if the mutex does\n+not support timeout.\n+Prior calls to @code{mtx_unlock} on the same mutex synchronize-with this\n+operation (if this operation succeeds), and all lock/unlock operations on any\n+given mutex form a single total order (similar to the modification order of\n+an atomic).\n+@end deftypefun\n+\n+@deftypefun int mtx_trylock (mtx_t *@var{mutex})\n+@safety{@prelim{}@mtsafe{}@asunsafe{@asulock{}}@acunsafe{@aculock{}}}\n+Tries to lock the mutex pointed to by @var{mutex} without blocking.  Returns\n+immediately if the mutex is already locked.\n+Prior calls to @code{mtx_unlock} on the same mutex synchronize-with this\n+operation (if this operation succeeds), and all lock/unlock operations on any\n+given mutex form a single total order (similar to the modification order of\n+an atomic).\n+@end deftypefun\n+\n+@deftypefun int mtx_unlock (mtx_t *@var{mutex})\n+@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}\n+Unlocks the mutex pointed to by @var{mutex}. The behavior is undefined if the\n+mutex is not locked by the calling thread.  This function synchronizes-with\n+subsequent @code{mtx_lock}, @code{mtx_trylock}, or @code{mtx_timedlock} on\n+the same mutex.  All lock/unlock operations on any given mutex form a single\n+total order (similar to the modification order of an atomic).\n+@end deftypefun\n+\n+@deftypefun void mtx_destroy (mtx_t *@var{mutex})\n+@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}\n+Destroys the mutex pointed to by @var{mutex}.  If there are threads waiting\n+on mutex, the behavior is undefined.\n+@end deftypefun\n+\n+The ISO C11 standard also defines several types of mutex that are also\n+supported.  They are represented with symbolic constants (enumeration type\n+values) and are the following:\n+\n+@vtable @code\n+\n+@item mtx_plain\n+Mutex type that does not support timeout or test and return.\n+\n+@item mtx_recursive\n+Mutex type that supports recursive locking, what means that owner thread can\n+lock it twice or more without causing deadlock.\n+\n+@item mtx_timed\n+Mutex type that supports timeout.\n+\n+@end vtable\n+\n+@node Condition variable, Thread-local storage, Mutex, ISO Threads\n+@section Condition Variable\n+\n+Mutexes are not the only synchronization mechanisms available.  For some more\n+complex tasks, @theglibc{} also implements conditional variables, that allow\n+the user to think in a higher level to solve complex synchronization problems.\n+They are used to synchronize threads waiting on a certain condition to happen.\n+\n+@deftp {Data Type} {cnd_t}\n+Condition variable object identifier.\n+@end deftp\n+\n+@deftypefun int cnd_init (cnd_t *@var{cond})\n+@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}\n+Initializes new conditional variable.  The object pointed to by @var{cond}\n+will be set to value that identifies the conditional variable.\n+@end deftypefun\n+\n+@deftypefun int cnd_signal (cnd_t *@var{cond})\n+@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}\n+Unblocks one thread that currently waits on conditional variable pointed to\n+by @var{cond}.  If no threads are blocked, does nothing and returns\n+@code{thrd_success}.\n+@end deftypefun\n+\n+@deftypefun int cnd_broadcast (cnd_t *@var{cond})\n+@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}\n+Unblocks all threads that currently wait on conditional variable pointed to\n+by @var{cond}.  If no threads are blocked, does nothing and returns\n+@code{thrd_success}.\n+@end deftypefun\n+\n+@deftypefun int cnd_wait (cnd_t *@var{cond}, mtx_t *@var{mutex})\n+@safety{@prelim{}@mtsafe{}@asunsafe{@asulock{}}@acunsafe{@aculock{}}}\n+Atomically unlocks the mutex pointed to by @var{mutex} and blocks on the\n+conditional variable pointed to by @var{cond} until the thread is signalled\n+by @code{cnd_signal} or @code{cnd_broadcast}.  The mutex is locked again\n+before the function returns.\n+@end deftypefun\n+\n+@deftypefun int cnd_timedwait (cnd_t *restrict @var{cond}, mtx_t *restrict @var{mutex}, const struct timespec *restrict @var{time_point})\n+@safety{@prelim{}@mtsafe{}@asunsafe{@asulock{}}@acunsafe{@aculock{}}}\n+Atomically unlocks the mutex pointed to by @var{mutex} and blocks on the\n+conditional variable pointed to by @var{cond} until the thread is signalled\n+by @code{cnd_signal} or @code{cnd_broadcast}, or until the wall-clock time\n+pointed to by @var{time_point} has been reached.  The mutex is locked again\n+before the function returns.\n+As for @code{mtx_timedlock}, this function also takes an absolute time\n+rather than a duration.\n+@end deftypefun\n+\n+@deftypefun void cnd_destroy (cnd_t *@var{cond})\n+@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}\n+Destroys the conditional variable pointed to by @var{cond}.  If there are\n+threads waiting on @var{cond}, the behavior is undefined.\n+@end deftypefun\n+\n+@node Thread-local storage, C11 error types, Condition variable, ISO Threads\n+@section Thread-local Storage\n+\n+@Theglibc{} also implements different functions that adds funtionality for\n+thread-local storage.  That means that each thread can have their own\n+variables and are not visible by other threads.  The functions and types\n+provided are:\n+\n+@deftp {Data Type} {tss_t}\n+Thread-specific storage object.  Even if shared, every thread will have\n+its own instance of that variable with different values.\n+@end deftp\n+\n+@deftp {Data Type} {tss_dtor_t}\n+Function pointer of type @code{void(*)(void*)}, used for TSS destructor.\n+This function will be called when the current thread calls @code{thrd_exit},\n+but never when calling @code{tss_delete} or @code{exit}\n+@end deftp\n+\n+@deftypevr Macro {} thread_local\n+Used to mark a variable with thread storage duration, that means created\n+when the thread starts and cleaned up when the thread ends.\n+@end deftypevr\n+\n+@deftypevr Macro {} TSS_DTOR_ITERATIONS\n+Integer constant expression representing the maximum number of times that\n+destructors will be called when a thread terminates.\n+@end deftypevr\n+\n+@deftypefun int tss_create (tss_t *@var{tss_key}, tss_dtor_t @var{destructor})\n+@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}\n+Creates new thread-specific storage key and stores it in the object pointed\n+to by @var{tss_key}.  Although the same key value may be used by different\n+threads, the values bound to the key by @code{tss_set} are maintained on a\n+per-thread basis and persist for the life of the calling thread.\n+\n+If @var{destructor} is different to NULL, a destructor function will be set,\n+and called when the thread finishes its execution by calling @code{thrd_exit}.\n+@end deftypefun\n+\n+@deftypefun void *tss_get (tss_t @var{tss_key})\n+@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}\n+Returns the value held in thread-specific storage for the current thread\n+identified by @var{tss_key}.  Different threads may get different values\n+identified by the same key.\n+@end deftypefun\n+\n+@deftypefun int tss_set (tss_t @var{tss_id}, void *@var{val})\n+@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}\n+Sets the value of the thread-specific storage identified by @var{tss_id} for\n+the current thread to @var{val}.  Different threads may set different values\n+to the same key.  The destructor, if available, is not invoked.\n+@end deftypefun\n+\n+@deftypefun void tss_delete (tss_t @var{tss_id})\n+@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}\n+Destroys the thread-specific storage identified by @var{tss_id}.  The\n+destructor, if one was registered by @code{tss_create}, is not called.\n+@end deftypefun\n+\n+@node C11 error types, , Thread-local storage, ISO Threads\n+@section Error Types\n+\n+The ISO C11 specification also provides new error types that belong\n+specifically to @code{threads.h}.  @Theglibc{} has also implemented this\n+feature and every function in this API always returns one of the following\n+error codes:\n+\n+@vtable @code\n+\n+@item thrd_timedout\n+Value returned by a function to indicate that a specified time was reached\n+without acquiring the requested resource, usually a mutex or conditional\n+variable.\n+\n+@item thrd_sucess\n+Value returned by a function to indicate that the requested operation\n+succeded.\n+\n+@item thrd_busy\n+Value returned by a function to indicate that the requested operation\n+failed because a resource requested is already in use.\n+\n+@item thrd_error\n+Value returned by a function to indicate that the requested operation\n+failed.\n+\n+@item thrd_nomem\n+Value returned by a function to indicate that the requested operation\n+failed because it was unable to allocate enough memory.\n+\n+@end vtable\n",
    "prefixes": [
        "8/8"
    ]
}