mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-30 22:43:12 +03:00
nptl: Change type of __default_pthread_attr
union pthread_attr_transparent has always the correct size, even if pthread_attr_t has padding that is not present in struct pthread_attr. This should not result in an observable behavioral change. The existing code appears to have been correct, but it was brittle because it was not clear which functions were allowed to write to an entire pthread_attr_t argument (e.g., by copying it). Reviewed-by: Carlos O'Donell <carlos@redhat.com>
This commit is contained in:
@ -22,7 +22,7 @@
|
||||
|
||||
/* Default thread attributes for the case when the user does not
|
||||
provide any. */
|
||||
struct pthread_attr __default_pthread_attr attribute_hidden;
|
||||
union pthread_attr_transparent __default_pthread_attr attribute_hidden;
|
||||
|
||||
/* Mutex protecting __default_pthread_attr. */
|
||||
int __default_pthread_attr_lock = LLL_LOCK_INITIALIZER;
|
||||
|
Reference in New Issue
Block a user