From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 0370D3848403 for ; Sun, 9 May 2021 21:41:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 0370D3848403 Received: from mail-qt1-f198.google.com (mail-qt1-f198.google.com [209.85.160.198]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-583-TcTjQ4lvO36G0NGjDJ6n-w-1; Sun, 09 May 2021 17:41:57 -0400 X-MC-Unique: TcTjQ4lvO36G0NGjDJ6n-w-1 Received: by mail-qt1-f198.google.com with SMTP id d13-20020a05622a05cdb02901c2cffd946bso9221690qtb.23 for ; Sun, 09 May 2021 14:41:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=DREkPvqnEvuMNXBNe1n4iwEQ58HrdiGkzTblwCWu8PU=; b=WdlqXwz+QhkpNyOliM9HKOp8C4iRnvZ4ZTg18FvjlD1w6VKqkDgBNUiWwmHAZkorRN i8/mKG21ZTgthWJDrFjGSUrIcU73yOhlcfD8HIcm1umLER5e7zsIi2I2pUjXrpHylvPR Ouw5HMjLvFDiEufg6eOI/GktjwqDLjzVNi3+yIFscBkQnNuAhLKBjuvoo5/mTVyEfv82 LxemSlpBd24dAkPE7q/BBDuDK+XWVzl1qca2DayNxLfkWjryA6010ddf3J/yY+EdprJH 6aN45rNhI9HAYmOIUym7hT1Tji1q9omYCqsbBoYSC/Lhc2zPHCy/YS5+1s++ejgcB0rR ngfw== X-Gm-Message-State: AOAM533RNSokh9ui5LieKsxPiZpbHezvqeLldgTx9sXEeeTsTg7pE8TR rWf80pL5Qyt0oqTUh2x1rMg2D3e9Q+PKcBFlGKiuI7ihT7LG3Bb2uqv41F2Ykz5UtV3aNWZkqhV UqqjlBtJEN2ZSS+YlhgkRvns2C7Mwk7M81YkNHt+/T+/z9oH6V9zDNMKDEoP4VYuMfXCaVw== X-Received: by 2002:ac8:470b:: with SMTP id f11mr9599331qtp.273.1620596517181; Sun, 09 May 2021 14:41:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxRKtlpQufkMrRSG5pfr3v9em0zoHcHg5Jibzxoy6I6a3IiAzvLiIGBVZ3o7CnZBnjf/IbENQ== X-Received: by 2002:ac8:470b:: with SMTP id f11mr9599317qtp.273.1620596516902; Sun, 09 May 2021 14:41:56 -0700 (PDT) Received: from [192.168.1.16] (198-84-214-74.cpe.teksavvy.com. [198.84.214.74]) by smtp.gmail.com with ESMTPSA id g140sm8846466qke.32.2021.05.09.14.41.55 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 09 May 2021 14:41:56 -0700 (PDT) Subject: Re: [PATCH 12/13] nptl: Move __default_pthread_attr, __default_pthread_attr_lock into libc To: Florian Weimer , libc-alpha@sourceware.org References: <2320d7987e65bc57dbef63c8af1448810cd2f3ea.1620323953.git.fweimer@redhat.com> From: Carlos O'Donell Organization: Red Hat Message-ID: Date: Sun, 9 May 2021 17:41:55 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <2320d7987e65bc57dbef63c8af1448810cd2f3ea.1620323953.git.fweimer@redhat.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-12.0 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, NICE_REPLY_A, 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-List-Received-Date: Sun, 09 May 2021 21:42:01 -0000 On 5/6/21 2:11 PM, Florian Weimer via Libc-alpha wrote: > The GLIBC_PRIVATE exports for these symbols are expected to be > temporary. LGTM. Tested on x86_64 and i686 without regression. 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) > -- Cheers, Carlos.