From patchwork Thu May 6 18:11:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 43282 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D53D53AAB4BA; Thu, 6 May 2021 18:11:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D53D53AAB4BA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1620324664; bh=+VaisRcaf5azDUlSJd5prbRq/tszI8QNfTdyiFBmty4=; h=To:Subject:In-Reply-To:References:Date:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=k8M0VQlb1CeNtp4d7es+mQOaYCQh3apWxKfbnDk71XAyupfagzK6pNdokN1okssDD moqKB41TjqT5wrer4XR1qfIWgbKBXUPx4U1s6FSKAQO5Z8+L2HaUMMKFajgIaO8dS9 8hgRjjp8/icqrel93MoE70Usx5LEfi+G//IH1+kk= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by sourceware.org (Postfix) with ESMTP id 650473AAB477 for ; Thu, 6 May 2021 18:11:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 650473AAB477 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-211-R6gOd4J_PUCRID1hCZIBPA-1; Thu, 06 May 2021 14:11:00 -0400 X-MC-Unique: R6gOd4J_PUCRID1hCZIBPA-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 99E2218A083A for ; Thu, 6 May 2021 18:10:59 +0000 (UTC) Received: from oldenburg.str.redhat.com (ovpn-112-137.ams2.redhat.com [10.36.112.137]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EF6F260657 for ; Thu, 6 May 2021 18:10:58 +0000 (UTC) To: libc-alpha@sourceware.org Subject: [PATCH 12/13] nptl: Move __default_pthread_attr, __default_pthread_attr_lock into libc In-Reply-To: References: Message-Id: <2320d7987e65bc57dbef63c8af1448810cd2f3ea.1620323953.git.fweimer@redhat.com> Date: Thu, 06 May 2021 20:11:17 +0200 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-12.8 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Florian Weimer via Libc-alpha From: Florian Weimer Reply-To: Florian Weimer Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" The GLIBC_PRIVATE exports for these symbols are expected to be temporary. Tested-by: Carlos O'Donell Reviewed-by: Carlos O'Donell --- nptl/Makefile | 2 +- nptl/Versions | 2 ++ nptl/pthreadP.h | 8 +++++--- nptl/vars.c | 8 ++++++-- 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/nptl/Makefile b/nptl/Makefile index b5f26c6864..f7723cb808 100644 --- a/nptl/Makefile +++ b/nptl/Makefile @@ -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 = \ diff --git a/nptl/Versions b/nptl/Versions index fb15a7e8eb..d439a023b7 100644 --- a/nptl/Versions +++ b/nptl/Versions @@ -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; diff --git a/nptl/pthreadP.h b/nptl/pthreadP.h index 3a6b436400..6b912f053b 100644 --- a/nptl/pthreadP.h +++ b/nptl/pthreadP.h @@ -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. */ diff --git a/nptl/vars.c b/nptl/vars.c index 03a6cc84be..989d7930e0 100644 --- a/nptl/vars.c +++ b/nptl/vars.c @@ -22,7 +22,11 @@ /* 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)