]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
nptl: Move __default_pthread_attr, __default_pthread_attr_lock into libc
authorFlorian Weimer <fweimer@redhat.com>
Mon, 10 May 2021 08:31:42 +0000 (10:31 +0200)
committerFlorian Weimer <fweimer@redhat.com>
Mon, 10 May 2021 08:31:42 +0000 (10:31 +0200)
The GLIBC_PRIVATE exports for these symbols are expected to be
temporary.

Tested-by: Carlos O'Donell <carlos@redhat.com>
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
nptl/Makefile
nptl/Versions
nptl/pthreadP.h
nptl/vars.c

index b5f26c686427d2618ba646a92925bc455d1ab97b..f7723cb808c3f198032006bce51a23a4832f033d 100644 (file)
@@ -170,6 +170,7 @@ routines = \
   sem_wait \
   tpp \
   unwind \
+  vars \
 
 shared-only-routines = forward
 static-only-routines = pthread_atfork
@@ -212,7 +213,6 @@ libpthread-routines = \
   pthread_sigqueue \
   pthread_timedjoin \
   pthread_tryjoin \
-  vars \
   version \
 
 libpthread-shared-only-routines = \
index fb15a7e8eb12120a1371eb44806fdce5282fbdfe..d439a023b7a90852628a59d9a14bff77875ea91f 100644 (file)
@@ -298,6 +298,8 @@ libc {
     tss_set;
   }
   GLIBC_PRIVATE {
+    __default_pthread_attr;
+    __default_pthread_attr_lock;
     __futex_abstimed_wait64;
     __futex_abstimed_wait_cancelable64;
     __init_sched_fifo_prio;
index 3a6b436400280d0d8afd9ec9e008d61ae01e6445..6b912f053b8f6f96941353b33aff6aa36f223846 100644 (file)
@@ -198,9 +198,11 @@ enum
 
 
 /* Default pthread attributes.  */
-extern union pthread_attr_transparent __default_pthread_attr attribute_hidden;
-extern int __default_pthread_attr_lock attribute_hidden;
-/* Called from __libpthread_freeres to deallocate the default attribute.  */
+extern union pthread_attr_transparent __default_pthread_attr;
+libc_hidden_proto (__default_pthread_attr)
+extern int __default_pthread_attr_lock;
+libc_hidden_proto (__default_pthread_attr_lock)
+/* Called from __libc_freeres to deallocate the default attribute.  */
 extern void __default_pthread_attr_freeres (void) attribute_hidden;
 
 /* Size and alignment of static TLS block.  */
index 03a6cc84be80a5de1e74c43f4a4edbe59d63cd4a..989d7930e0d1113e8b727b304dc014c6a13d5db3 100644 (file)
 
 /* Default thread attributes for the case when the user does not
    provide any.  */
-union pthread_attr_transparent __default_pthread_attr attribute_hidden;
+union pthread_attr_transparent __default_pthread_attr
+  __attribute__ ((nocommon));
+libc_hidden_data_def (__default_pthread_attr)
 
 /* Mutex protecting __default_pthread_attr.  */
-int __default_pthread_attr_lock = LLL_LOCK_INITIALIZER;
+int __default_pthread_attr_lock __attribute__ ((nocommon))
+  = LLL_LOCK_INITIALIZER;
+libc_hidden_data_def (__default_pthread_attr_lock)