From 331c6e8a184167dd21a9f0b3fc165aeefea6eeca Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Tue, 19 May 2020 12:32:39 +0200 Subject: 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 Tested-by: Carlos O'Donell --- sysdeps/nptl/internaltypes.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'sysdeps') 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 -- cgit 1.4.1