From patchwork Mon May 27 10:59:11 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 32858 Received: (qmail 18596 invoked by alias); 27 May 2019 10:59:15 -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 18588 invoked by uid 89); 27 May 2019 10:59:15 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-18.9 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_HELO_PASS autolearn=ham version=3.3.1 spammy=H*r:sk:libc-al, HX-Languages-Length:953, H*F:D*redhat.com X-HELO: mx1.redhat.com From: Florian Weimer To: libc-alpha@sourceware.org Subject: [PATCH] nptl: Add comment to __pthread_get_minstack about external users Date: Mon, 27 May 2019 12:59:11 +0200 Message-ID: <87sgt0jh8g.fsf@oldenburg2.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 2019-05-27 Florian Weimer * nptl/nptl-init.c: Add comment. Reviewed-by: Carlos O'Donell diff --git a/nptl/nptl-init.c b/nptl/nptl-init.c index 2926558b91..73935f8be4 100644 --- a/nptl/nptl-init.c +++ b/nptl/nptl-init.c @@ -407,6 +407,14 @@ strong_alias (__pthread_initialize_minimal_internal, __pthread_initialize_minimal) +/* This function is internal (it has a GLIBC_PRIVATE) version, but it + is widely used (either via weak symbol, or dlsym) to obtain the + __static_tls_size value. This value is then used to adjust the + value of the stack size attribute, so that applications receive the + full requested stack size, not diminished by the TCB and static TLS + allocation on the stack. Once the TCB is separately allocated, + this function should be removed or renamed (if it is still + necessary at that point). */ size_t __pthread_get_minstack (const pthread_attr_t *attr) {