This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] nptl: Add comment to __pthread_get_minstack about external users
- From: Carlos O'Donell <carlos at redhat dot com>
- To: Florian Weimer <fweimer at redhat dot com>, libc-alpha at sourceware dot org
- Date: Mon, 27 May 2019 08:11:45 -0400
- Subject: Re: [PATCH] nptl: Add comment to __pthread_get_minstack about external users
- References: <87sgt0jh8g.fsf@oldenburg2.str.redhat.com>
On 5/27/19 5:59 AM, Florian Weimer wrote:
> 2019-05-27 Florian Weimer <fweimer@redhat.com>
>
> * nptl/nptl-init.c: Add comment.
>
OK for master. Given that I almost removed this once last year it's a good
thing to have a comment here.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
> 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)
> {
>
--
Cheers,
Carlos.