1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-08-01 10:06:57 +03:00

Move __default_stacksize into __default_pthread_attr

Make __default_pthread_attr object to store default attribute values
for threads.
This commit is contained in:
Siddhesh Poyarekar
2013-03-19 14:34:13 +05:30
parent d3cfc668a3
commit e903a7138b
7 changed files with 26 additions and 22 deletions

View File

@ -435,15 +435,6 @@ start_thread (void *arg)
}
/* Default thread attributes for the case when the user does not
provide any. */
static const struct pthread_attr default_attr =
{
/* Just some value > 0 which gets rounded to the nearest page size. */
.guardsize = 1,
};
int
__pthread_create_2_1 (newthread, attr, start_routine, arg)
pthread_t *newthread;
@ -457,7 +448,7 @@ __pthread_create_2_1 (newthread, attr, start_routine, arg)
if (iattr == NULL)
/* Is this the best idea? On NUMA machines this could mean
accessing far-away memory. */
iattr = &default_attr;
iattr = &__default_pthread_attr;
struct pthread *pd = NULL;
int err = ALLOCATE_STACK (iattr, &pd);