aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/nptl
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 /sysdeps/nptl
parent3699ef99de0d69284cdd28c3cc5e1aa89e398443 (diff)
downloadglibc-331c6e8a184167dd21a9f0b3fc165aeefea6eeca.tar
glibc-331c6e8a184167dd21a9f0b3fc165aeefea6eeca.tar.gz
glibc-331c6e8a184167dd21a9f0b3fc165aeefea6eeca.tar.bz2
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 'sysdeps/nptl')
-rw-r--r--sysdeps/nptl/internaltypes.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/sysdeps/nptl/internaltypes.h b/sysdeps/nptl/internaltypes.h
index 71f09b4624..6d06a76baf 100644
--- a/sysdeps/nptl/internaltypes.h
+++ b/sysdeps/nptl/internaltypes.h
@@ -49,6 +49,13 @@ struct pthread_attr
#define ATTR_FLAG_SCHED_SET 0x0020
#define ATTR_FLAG_POLICY_SET 0x0040
+/* Used to allocate a pthread_attr_t object which is also accessed
+ internally. */
+union pthread_attr_transparent
+{
+ pthread_attr_t external;
+ struct pthread_attr internal;
+};
/* Mutex attribute data structure. */
struct pthread_mutexattr