From patchwork Wed Nov 12 22:52:58 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roland McGrath X-Patchwork-Id: 3683 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: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@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 From: Roland McGrath To: "GNU C. Library" 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 14:52:58 -0800 (PST) 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 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 * 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 +#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;