about summary refs log tree commit diff
path: root/src/thread/pthread_setattr_default_np.c
Commit message (Collapse)AuthorAgeFilesLines
* limit the configurable default stack/guard size for threadsRich Felker2018-09-181-4/+8
| | | | | | | | | | limit to 8MB/1MB, repectively. since the defaults cannot be reduced once increased, excessively large settings would lead to an unrecoverably broken state. this change is in preparation to allow defaults to be increased via program headers at the linker level. creation of threads that really need larger sizes needs to be done with an explicit attribute.
* remove redundant declarations of __default_stacksize, __default_guardsizeRich Felker2018-09-181-3/+0
| | | | these are now declared in pthread_impl.h.
* fix issues from public functions defined without declaration visibleRich Felker2018-09-121-0/+1
| | | | | | | | | | | | | | | | | policy is that all public functions which have a public declaration should be defined in a context where that public declaration is visible, to avoid preventable type mismatches. an audit performed using GCC's -Wmissing-declarations turned up the violations corrected here. in some cases the public header had not been included; in others, a feature test macro needed to make the declaration visible had been omitted. in the case of gethostent and getnetent, the omission seems to have been intentional, as a hack to admit a single stub definition for both functions. this kind of hack is no longer acceptable; it's UB and would not fly with LTO or advanced toolchains. the hack is undone to make exposure of the declarations possible.
* add limited pthread_setattr_default_np API to set stack size defaultsRich Felker2016-11-081-0/+35
based on patch by Timo Teräs: While generally this is a bad API, it is the only existing API to affect c++ (std::thread) and c11 (thrd_create) thread stack size. This patch allows applications only to increate stack and guard page sizes.