This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Use default_attr to store default pthread attributes
- From: Roland McGrath <roland at hack dot frob dot com>
- To: Siddhesh Poyarekar <siddhesh at redhat dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Thu, 14 Mar 2013 08:25:59 -0700 (PDT)
- Subject: Re: [PATCH] Use default_attr to store default pthread attributes
- References: <20130314114930.GX22471@spoyarek.pnq.redhat.com>
> * allocatestack.c (allocate_stack): Use DEFAULT_ATTR.
The caps convention is only for local variables.
> -/* Default stack size. */
> -extern size_t __default_stacksize attribute_hidden;
> +/* Default pthread attributes. */
> +extern struct pthread_attr default_attr;
> +hidden_proto (default_attr);
It's far simpler just to make this an __ name with attribute_hidden.
The hidden_proto sort of thing is really only for public names.
(Incidentally, no trailing ; after hidden_proto.)
This makes the various renamings of local-scope variables called
default_attr unnecessary, though that's not a bad idea just for
readability/grepability anyway. But really that is then a cosmetic change
that should be separate from all this.
Thanks,
Roland