From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <libc-alpha-return-54304-listarch-libc-alpha=sources.redhat.com@sourceware.org> Received: (qmail 23789 invoked by alias); 12 Nov 2014 22:53:02 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: <libc-alpha.sourceware.org> List-Subscribe: <mailto:libc-alpha-subscribe@sourceware.org> List-Archive: <http://sourceware.org/ml/libc-alpha/> List-Post: <mailto:libc-alpha@sourceware.org> List-Help: <mailto:libc-alpha-help@sourceware.org>, <http://sourceware.org/ml/#faqs> Sender: libc-alpha-owner@sourceware.org Received: (qmail 23778 invoked by uid 89); 12 Nov 2014 22:53:01 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 X-HELO: topped-with-meat.com MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit From: Roland McGrath <roland@hack.frob.com> To: "GNU C. Library" <libc-alpha@sourceware.org> Subject: [COMMITTED PATCH] NPTL: Move __libc_multiple_threads_ptr defn to nptl-init.c Message-Id: <20141112225258.6D3F32C3B29@topped-with-meat.com> Date: Wed, 12 Nov 2014 22:53:00 -0000 X-CMAE-Score: 0 X-CMAE-Analysis: v=2.1 cv=SvUDtp+0 c=1 sm=1 tr=0 a=WkljmVdYkabdwxfqvArNOQ==:117 a=14OXPxybAAAA:8 a=kj9zAlcOel0A:10 a=hOe2yjtxAAAA:8 a=XXKaMglMqV1Ew3n2tHYA:9 a=CjuIK1q_8ugA:10 X-SW-Source: 2014-11/txt/msg00278.txt.bz2 There was no rhyme or reason to the placement of this definition. Move it to the file where the variable gets initialized. Verified no code changes on x86_64-linux-gnu (except for assertion line numbers). Thanks, Roland 2014-11-12 Roland McGrath <roland@hack.frob.com> * nptl/createthread.c [!TLS_MULTIPLE_THREADS_IN_TCB] (__libc_multiple_threads_ptr): Variable moved ... * nptl/nptl-init.c [!TLS_MULTIPLE_THREADS_IN_TCB]: ... here. --- a/nptl/createthread.c +++ b/nptl/createthread.c @@ -36,12 +36,6 @@ #endif -#ifndef TLS_MULTIPLE_THREADS_IN_TCB -/* Pointer to the corresponding variable in libc. */ -int *__libc_multiple_threads_ptr attribute_hidden; -#endif - - static int do_clone (struct pthread *pd, const struct pthread_attr *attr, int clone_flags, int (*fct) (void *), STACK_VARIABLES_PARMS, --- a/nptl/nptl-init.c +++ b/nptl/nptl-init.c @@ -37,6 +37,11 @@ #include <kernel-features.h> +#ifndef TLS_MULTIPLE_THREADS_IN_TCB +/* Pointer to the corresponding variable in libc. */ +int *__libc_multiple_threads_ptr attribute_hidden; +#endif + /* Size and alignment of static TLS block. */ size_t __static_tls_size; size_t __static_tls_align_m1;