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:
@ -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);
|
||||
|
Reference in New Issue
Block a user