about summary refs log tree commit diff
path: root/nptl/pthreadP.h
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2020-05-19 12:32:39 +0200
committerFlorian Weimer <fweimer@redhat.com>2020-05-20 20:28:44 +0200
commit331c6e8a184167dd21a9f0b3fc165aeefea6eeca (patch)
tree76c20764a829cbb26017adb371e0160ffa2c7afd /nptl/pthreadP.h
parent3699ef99de0d69284cdd28c3cc5e1aa89e398443 (diff)
downloadglibc-331c6e8a184167dd21a9f0b3fc165aeefea6eeca.tar.gz
glibc-331c6e8a184167dd21a9f0b3fc165aeefea6eeca.tar.xz
glibc-331c6e8a184167dd21a9f0b3fc165aeefea6eeca.zip
nptl: Add __pthread_attr_copy for copying pthread_attr_t objects
Also add the private type union pthread_attr_transparent, to reduce
the amount of casting that is required.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-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 f218b01574..41b693d034 100644
--- a/nptl/pthreadP.h
+++ b/nptl/pthreadP.h
@@ -580,6 +580,12 @@ extern void __wait_lookup_done (void) attribute_hidden;
 # define PTHREAD_STATIC_FN_REQUIRE(name) __asm (".globl " #name);
 #endif
 
+/* Make a deep copy of the attribute *SOURCE in *TARGET.  *TARGET is
+   not assumed to have been initialized.  Returns 0 on success, or a
+   positive error code otherwise.  */
+int __pthread_attr_copy (pthread_attr_t *target, const pthread_attr_t *source);
+libc_hidden_proto (__pthread_attr_copy)
+
 /* Returns 0 if POL is a valid scheduling policy.  */
 static inline int
 check_sched_policy_attr (int pol)