mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
New API to set default thread attributes
This patch introduces two new convenience functions to set the default thread attributes used for creating threads. This allows a programmer to set the default thread attributes just once in a process and then run pthread_create without additional attributes.
This commit is contained in:
@ -423,8 +423,10 @@ __pthread_initialize_minimal_internal (void)
|
||||
|
||||
/* Round the resource limit up to page size. */
|
||||
limit.rlim_cur = (limit.rlim_cur + pagesz - 1) & -pagesz;
|
||||
lll_lock (__default_pthread_attr_lock, LLL_PRIVATE);
|
||||
__default_pthread_attr.stacksize = limit.rlim_cur;
|
||||
__default_pthread_attr.guardsize = GLRO (dl_pagesize);
|
||||
lll_unlock (__default_pthread_attr_lock, LLL_PRIVATE);
|
||||
|
||||
#ifdef SHARED
|
||||
/* Transfer the old value from the dynamic linker's internal location. */
|
||||
|
Reference in New Issue
Block a user