summaryrefslogtreecommitdiff
path: root/src/thread/pthread_setattr_default_np.c
AgeCommit message (Collapse)AuthorLines
2018-09-18limit the configurable default stack/guard size for threadsRich Felker-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.
2018-09-18remove redundant declarations of __default_stacksize, __default_guardsizeRich Felker-3/+0
these are now declared in pthread_impl.h.
2018-09-12fix issues from public functions defined without declaration visibleRich Felker-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.
2016-11-08add limited pthread_setattr_default_np API to set stack size defaultsRich Felker-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.