summaryrefslogtreecommitdiff
path: root/nptl/pthreadP.h
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2020-06-02 10:33:30 +0200
committerFlorian Weimer <fweimer@redhat.com>2020-06-02 11:54:58 +0200
commit7538d461134bf306e31b40e4032f0c225bb40d51 (patch)
tree34c4ceb7c6565864dfc62d8e23dd8f37e24944af /nptl/pthreadP.h
parent6993670b52daa413717e840dfb17b5322e7f4a88 (diff)
downloadglibc-7538d461134bf306e31b40e4032f0c225bb40d51.tar
glibc-7538d461134bf306e31b40e4032f0c225bb40d51.tar.gz
glibc-7538d461134bf306e31b40e4032f0c225bb40d51.tar.bz2
glibc-7538d461134bf306e31b40e4032f0c225bb40d51.zip
nptl: Make pthread_attr_t dynamically extensible
This introduces the function __pthread_attr_extension to allocate the extension space, which is freed by pthread_attr_destroy. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Diffstat (limited to 'nptl/pthreadP.h')
-rw-r--r--nptl/pthreadP.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/nptl/pthreadP.h b/nptl/pthreadP.h
index ed30b72923..7b3153594e 100644
--- a/nptl/pthreadP.h
+++ b/nptl/pthreadP.h
@@ -578,6 +578,12 @@ extern void __shm_directory_freeres (void) attribute_hidden;
extern void __wait_lookup_done (void) attribute_hidden;
+/* Allocates the extension space for ATTR. Returns an error code on
+ memory allocation failure, zero on success. If ATTR already has an
+ extension space, this function does nothing. */
+int __pthread_attr_extension (struct pthread_attr *attr) attribute_hidden
+ __attribute_warn_unused_result__;
+
#ifdef SHARED
# define PTHREAD_STATIC_FN_REQUIRE(name)
#else